/* ==========================================================================
   TeamTrek — the pricing page
   --------------------------------------------------------------------------
   A control strip, two short cards and one table.

   The first build put every feature inside the cards, which made each one
   just over a thousand pixels tall: a reader had to scroll a screen and a
   half to see the second price. The cards now carry the price, what this
   team would pay, the one action and five things that matter; the other
   sixteen are in the table, where somebody who has decided can check them
   without somebody who has not having to scroll past them.

   The two cards are deliberately not the same object. One is white and
   lit, the other is ink: two white columns of ticks invite a reader to
   compare them pixel for pixel, and these are two different kinds of
   purchase -- a card payment and a procurement process.

   PRICES ARE INDICATIVE, and the note under the cards says so.
   ========================================================================== */

/* The hero gives up its lower padding: the control strip sits on the band's
   edge, half in the hero and half on the section below it. */
.pricehero { padding-bottom: 7rem; }

/* ------------------------------------------------------- the control strip
   Team size and billing period, in one bar both cards answer to. It is the
   page's one interactive object, so it gets the page's one shadow.
   ------------------------------------------------------------------------ */
.plansec { padding-top: 0; }

.pricebar {
  position: relative; z-index: 1;
  margin-top: -4.5rem; margin-bottom: 2.5rem;
  display: grid; gap: 1.5rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--neutral-200); border-radius: var(--r-lg);
  background: #fff;
  box-shadow: 0 24px 48px -32px rgb(16 24 40 / .28);
}
@media (min-width: 860px) {
  .pricebar {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2.5rem; align-items: center;
  }
}

.pricebar__label {
  margin-bottom: .5rem;
  font-size: .6875rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--neutral-500);
}

.pricebar__count { display: flex; align-items: center; gap: .5rem; }
.pricebar__step {
  width: 2.25rem; height: 2.25rem; flex: none;
  display: inline-grid; place-items: center;
  border: 1px solid var(--neutral-200); border-radius: var(--r-pill);
  background: #fff;
  font: inherit; font-size: 1.125rem; font-weight: 700; line-height: 1;
  color: var(--neutral-700); cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}
.pricebar__step:hover { border-color: var(--primary-300); color: var(--primary-700); background: var(--primary-50, #E7F4F1); }
.pricebar__step:focus-visible { outline: 2px solid var(--primary-600); outline-offset: 2px; }

.pricebar__num {
  width: 4.5rem; height: 2.25rem;
  padding: 0 .5rem;
  border: 1px solid var(--neutral-200); border-radius: var(--r-sm);
  background: #fff;
  font: inherit; font-size: 1.0625rem; font-weight: 800; text-align: center;
  color: var(--neutral-900); font-variant-numeric: tabular-nums;
}
.pricebar__num:focus-visible { outline: 2px solid var(--primary-600); outline-offset: 1px; }
/* The spinners are a second control for the same value, beside two
   buttons that already do it. */
.pricebar__num::-webkit-outer-spin-button,
.pricebar__num::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pricebar__num { -moz-appearance: textfield; appearance: textfield; }

.pricebar__word { font-size: .9375rem; color: var(--neutral-600); }

.pricebar__range {
  -webkit-appearance: none; appearance: none;
  width: 100%; margin-top: .875rem;
  height: 6px; border-radius: var(--r-pill);
  background: var(--neutral-150, #EDEFEF);
  cursor: pointer;
}
.pricebar__range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--primary-700); border: 3px solid #fff;
  box-shadow: 0 2px 8px rgb(16 24 40 / .25);
  cursor: grab;
}
.pricebar__range::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--primary-700); border: 3px solid #fff;
  box-shadow: 0 2px 8px rgb(16 24 40 / .25);
  cursor: grab;
}
.pricebar__range:focus-visible { outline: 2px solid var(--primary-600); outline-offset: 4px; }

.pricebar__help { margin-top: .5rem; font-size: .75rem; color: var(--neutral-400); }

/* ----------------------------------------------------- the billing switch
   Two buttons in a track, not a checkbox switch: a switch has to say what
   its on state means, and these say it themselves.
   ------------------------------------------------------------------------ */
.billing {
  display: inline-flex; align-items: center; gap: .25rem;
  padding: .25rem;
  border: 1px solid var(--neutral-200); border-radius: var(--r-pill);
  background: var(--neutral-25, #FAFBFB);
}
.billing__opt {
  display: inline-flex; align-items: center; gap: .4375rem;
  min-height: 2.25rem; padding: 0 1rem;
  border: 0; border-radius: var(--r-pill);
  background: transparent;
  font: inherit; font-size: .9375rem; font-weight: 600; color: var(--neutral-600);
  cursor: pointer;
  transition: background-color .16s var(--ease-ui), color .16s var(--ease-ui);
}
.billing__opt:hover { color: var(--neutral-900); }
.billing__opt:focus-visible { outline: 2px solid var(--primary-600); outline-offset: 2px; }
.billing__opt.is-on { background: var(--primary-700); color: #fff; }

.billing__save {
  padding: .125rem .4375rem;
  border-radius: var(--r-pill);
  background: var(--primary-50, #E7F4F1); color: var(--primary-800);
  font-size: .6875rem; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.billing__opt.is-on .billing__save { background: rgb(255 255 255 / .22); color: #fff; }

/* ------------------------------------------------------------- the cards */
.plans {
  display: grid; gap: 1.25rem;
  grid-template-columns: minmax(0, 1fr);
  /* Stretch, not start: one card carries a line the other does not, and a
     36px step between two cards of the same row reads as a mistake. */
  align-items: stretch;
}
@media (min-width: 900px) {
  .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
}

.plan {
  position: relative;
  display: flex; flex-direction: column;
  padding: 1.625rem;
  border: 1px solid var(--neutral-200); border-radius: var(--r-lg);
  background: #fff;
}

/* The lit one. A ring and the button, not a tinted ground: the ring is an
   inset shadow rather than a 2px border, so the card's inner edge does not
   move by a pixel against the one beside it. */
.plan--lead {
  border-color: var(--primary-600);
  box-shadow: inset 0 0 0 1px var(--primary-600),
              0 10px 30px rgb(0 122 112 / .12);
}
.plan__flag {
  position: absolute; top: 0; left: 50%;
  transform: translate(-50%, -50%);
  padding: .3125rem .75rem;
  border-radius: var(--r-pill);
  background: var(--primary-700); color: #fff;
  font-size: .6875rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  white-space: nowrap;
}

/* The ink card. Same rows, different material. */
.plan--ink {
  border-color: transparent;
  background:
    radial-gradient(120% 90% at 100% 0%, rgb(22 163 148 / .22) 0%, transparent 60%),
    var(--ink-900);
  color: #fff;
}
.plan--ink .plan__name { color: #fff; }
.plan--ink .plan__for,
.plan--ink .plan__under { color: rgb(255 255 255 / .68); }
.plan--ink .plan__price { border-top-color: rgb(255 255 255 / .14); }
.plan--ink .plan__fig { color: #fff; }
.plan--ink .plan__unit { color: rgb(255 255 255 / .6); }
.plan--ink .plan__total {
  border-color: rgb(255 255 255 / .16);
  background: rgb(255 255 255 / .06);
}
.plan--ink .plan__total b { color: #fff; }
.plan--ink .plan__total span { color: rgb(255 255 255 / .62); }
.plan--ink .plan__list { border-top-color: rgb(255 255 255 / .14); }
.plan--ink .plan__list li { color: rgb(255 255 255 / .82); }
.plan--ink .plan__list .icon { color: var(--primary-300); }
.plan--ink .plan__more { color: #fff; }
.plan--ink .plan__more:hover { color: var(--primary-200); }

.badge--ink {
  background: rgb(255 255 255 / .12); color: #fff;
  border-color: rgb(255 255 255 / .2);
}

.plan__row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.plan__name { font-size: 1.25rem; font-weight: 800; letter-spacing: -.02em; color: var(--neutral-900); }
.plan__for {
  margin-top: .375rem;
  font-size: .9375rem; line-height: 1.5; color: var(--neutral-600);
  min-height: 2.8125rem;
}

/* The figure. Currency and unit are small and grey against it, so the
   number is the only thing read at a glance. */
.plan__price {
  display: flex; align-items: flex-start; gap: .3125rem;
  margin-top: 1.125rem; padding-top: 1.125rem;
  border-top: 1px solid var(--neutral-150, #EDEFEF);
  min-height: 4rem;
}
.plan__cur { margin-top: .375rem; font-size: 1.25rem; font-weight: 700; color: var(--neutral-500); }
.plan__fig {
  font-size: 2.75rem; font-weight: 800; line-height: 1; letter-spacing: -.03em;
  color: var(--neutral-900); font-variant-numeric: tabular-nums;
}
.plan__unit {
  align-self: flex-end; margin-bottom: .125rem;
  font-size: .75rem; line-height: 1.3; color: var(--neutral-500);
}
.plan__price--talk .plan__fig { font-size: 2.25rem; letter-spacing: -.02em; }

/* What this team would pay, which is the sum a reader is doing in their
   head while they read the figure above. */
.plan__total {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem;
  margin-top: .875rem; padding: .625rem .875rem;
  border: 1px solid var(--neutral-200); border-radius: var(--r-md, 10px);
  background: var(--neutral-25, #FAFBFB);
}
.plan__total b {
  font-size: 1.0625rem; font-weight: 800; color: var(--neutral-900);
  font-variant-numeric: tabular-nums;
}
.plan__total span { font-size: .8125rem; color: var(--neutral-500); }

.plan__cta { margin-top: 1rem; }
.plan__under {
  margin-top: .625rem;
  font-size: .8125rem; line-height: 1.5; color: var(--neutral-500);
  min-height: 2.4375rem;
}

.plan__inherits {
  display: flex; align-items: center; gap: .5rem;
  margin-top: 1.25rem;
  font-size: .875rem; font-weight: 700; color: var(--primary-300);
}
.plan__inherits .icon { flex: none; }

.plan__list {
  margin-top: 1.125rem; padding-top: 1.125rem;
  border-top: 1px solid var(--neutral-150, #EDEFEF);
  display: grid; gap: .5625rem;
}
.plan--ink .plan__list { margin-top: .75rem; }
.plan__list li { font-size: .875rem; line-height: 1.45; }

.plan__more {
  margin-top: 1.125rem;
  display: inline-flex; align-items: center; gap: .375rem;
  font-size: .8125rem; font-weight: 700; color: var(--primary-800);
}
.plan__more:hover { color: var(--primary-600); }
.plan__more .icon { transition: transform .18s var(--ease-brand); }
.plan__more:hover .icon { transform: translateY(2px); }

.plansec__note {
  display: flex; align-items: flex-start; justify-content: center; gap: .5rem;
  margin: 2rem auto 0; max-width: 52ch; text-align: center;
  font-size: .8125rem; line-height: 1.6; color: var(--neutral-500);
}
.plansec__note .icon { flex: none; margin-top: .125rem; color: var(--neutral-400); }

/* -------------------------------------------------------------- the table
   Grouped by what a reader is checking for. The head sticks under the
   navbar, so the two plan columns stay named while the rows pass.
   ------------------------------------------------------------------------ */
.ptable {
  margin-top: 2.5rem;
  border: 1px solid var(--neutral-200); border-radius: var(--r-lg);
  background: #fff;
  overflow: hidden;
}
.ptable table { width: 100%; border-collapse: collapse; }

.ptable thead th {
  /* Not sticky. A sticky head inside a clipped, rounded wrapper leaves the
     table's own top edge empty above the pinned row once it passes, which
     reads as a rendering fault rather than as a fixed header. The table is
     1,240px tall with a labelled group every six rows, which is what keeps
     a reader oriented instead. */
  padding: .875rem 1.25rem;
  background: var(--neutral-25, #FAFBFB);
  border-bottom: 1px solid var(--neutral-200);
  font-size: .6875rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--neutral-500);
  text-align: left;
}
.ptable thead th:nth-child(n+2) { text-align: center; width: 7.5rem; }

.ptable__group th {
  padding: .75rem 1.25rem;
  background: var(--primary-50, #E7F4F1);
  border-block: 1px solid var(--primary-200);
  font-size: .6875rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--primary-800);
  text-align: left;
}

.ptable tbody tr:not(.ptable__group) th {
  padding: .8125rem 1.25rem;
  font-size: .9375rem; font-weight: 500; line-height: 1.45;
  color: var(--neutral-700); text-align: left;
}
.ptable tbody tr:not(.ptable__group) + tr:not(.ptable__group) th,
.ptable tbody tr:not(.ptable__group) + tr:not(.ptable__group) td {
  border-top: 1px solid var(--neutral-150, #EDEFEF);
}
.ptable tbody tr:not(.ptable__group):hover th,
.ptable tbody tr:not(.ptable__group):hover td { background: var(--neutral-25, #FAFBFB); }

/* The cells carry the word for a screen reader and draw the mark for the
   eye: a bare tick is unreadable aloud, and "Yes" twenty-one times is
   unreadable by eye. */
.ptable td { position: relative; text-align: center; font-size: 0; }
.ptable td::after {
  content: ""; display: inline-block;
  width: 18px; height: 18px;
  background: currentColor;
  -webkit-mask: var(--mark) center / contain no-repeat;
  mask: var(--mark) center / contain no-repeat;
}
.ptable td[data-yes] {
  color: var(--primary-600);
  --mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}
.ptable td[data-no] {
  color: var(--neutral-300);
  --mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M5 12h14'/%3E%3C/svg%3E");
}

/* ------------------------------------------------------------ responsive */
@media (max-width: 899px) {
  /* Stacked, the ribbon would sit in the gap under the card above it. */
  .plan--lead { margin-top: .5rem; }
  /* The reserved rows only earn their place when the cards are side by
     side: stacked, each is as tall as its own content. */
  .plan__for, .plan__under, .plan__price { min-height: 0; }
  .pricehero { padding-bottom: 6rem; }
}

@media (max-width: 639px) {
  .plan { padding: 1.25rem; }
  .plan__fig { font-size: 2.25rem; }
  .pricebar { margin-top: -3.5rem; padding: 1.125rem; }
  .pricebar__billing .billing { width: 100%; }
  .billing__opt { flex: 1; justify-content: center; padding: 0 .625rem; }
  .ptable thead th,
  .ptable__group th,
  .ptable tbody tr:not(.ptable__group) th { padding-inline: .875rem; }
  .ptable thead th:nth-child(n+2) { width: 4.5rem; }
  .ptable tbody tr:not(.ptable__group) th { font-size: .875rem; }
}

/* The narrowest phones. Two tick columns at 72px each leave the feature
   column too little to wrap in, and the table was clipping its last column
   rather than overflowing the page. */
@media (max-width: 400px) {
  /* "ENTERPRISE" is one 10-character word: at .08em of tracking it does not
     fit a 52px column and was being clipped. The tracking goes, not the
     size -- 11px uppercase is the floor. */
  .ptable thead th:nth-child(n+2) { width: 4.25rem; letter-spacing: .01em; }
  .ptable thead th,
  .ptable__group th,
  .ptable tbody tr:not(.ptable__group) th { padding-inline: .75rem; }
  .ptable tbody tr:not(.ptable__group) th { font-size: .8125rem; }
  .ptable td::after { width: 16px; height: 16px; }
}

@media (pointer: coarse) {
  .billing__opt { min-height: 2.75rem; }
  .pricebar__step { width: 2.75rem; height: 2.75rem; }
  .pricebar__num { height: 2.75rem; }
}
@media (prefers-reduced-motion: reduce) {
  .billing__opt, .pricebar__step, .plan__more .icon { transition: none; }
}
