/* plans.css — the plan cards and the comparison table (public/plans.js).
   One look in two places: the sign-up's plan step (auth.css, black stage) and
   Account › Plans (account.css, light or dark). Each host sets the --pl-*
   colours; Pro is the navy card of the landing page in every theme.
   The radii stay on the app's --r-* scale. */

.pl {
  --pl-card: #FFFFFF;
  --pl-line: #E4E7EC;
  --pl-ink: #0F1222;
  --pl-body: #474C5C;
  --pl-muted: #6B7080;
  --pl-band: #EFF1F6;
  --pl-thumb: #FFFFFF;
  --pl-blue: #2E4BDB;
  --pl-blue-ink: #2743C9;
  --pl-blue-soft: rgb(46 75 219 / .07);
  --pl-display: 'Satoshi', 'Inter Var', 'IBM Plex Sans Arabic', system-ui, sans-serif;
  --pl-ease: cubic-bezier(.21, .47, .32, .98);
  --pl-spring: cubic-bezier(.34, 1.3, .5, 1);
  display: flex; flex-direction: column; gap: 20px;
  color: var(--pl-ink);
}

/* ---- the three cards ---- */
.pl-grid {
  display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr));
  grid-auto-rows: auto; gap: 20px; align-items: stretch;
}
.pl-card {
  /* five rows shared across the cards, so the switches, prices and buttons line up */
  grid-row: span 5; display: grid; grid-template-rows: subgrid; row-gap: 0;
  padding: 28px 26px 26px; border-radius: var(--r-xl);
  background: var(--pl-card); box-shadow: 0 0 0 1px var(--pl-line);
  transition: box-shadow .3s ease;
  animation: pl-in .5s var(--pl-ease) both;
}
.pl-card:nth-child(2) { animation-delay: .06s; }
.pl-card:nth-child(3) { animation-delay: .12s; }
.pl-card:hover { box-shadow: 0 0 0 1px color-mix(in srgb, var(--pl-ink) 22%, transparent); }
@keyframes pl-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.pl-top { display: flex; flex-direction: column; gap: 8px; }
.pl-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 30px; }
.pl-name { margin: 0; font-family: var(--pl-display); font-weight: 600; font-size: 24px; line-height: 1.1; letter-spacing: -.02em; color: var(--pl-ink); }
.pl-badge { flex: none; padding: 5px 11px; border-radius: var(--r-pill); font-size: 12.5px; font-weight: 600; line-height: 1.2; background: var(--pl-band); color: var(--pl-blue-ink); }
.pl-badge[hidden] { display: none; }
.pl-blurb { margin: 0 0 22px; font-size: 14.5px; line-height: 1.45; color: var(--pl-body); text-wrap: pretty; }

/* the in-card switch: a thumb slides under the chosen option */
.pl-seg {
  position: relative; align-self: start; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr));
  padding: 4px; border-radius: var(--r-pill); background: var(--pl-band); isolation: isolate;
}
.pl-seg::before {
  content: ''; position: absolute; z-index: -1; top: 4px; bottom: 4px; left: 4px;
  width: calc((100% - 8px) / var(--n)); border-radius: var(--r-pill);
  background: var(--pl-thumb); box-shadow: 0 1px 2px rgb(15 18 34 / .12), 0 0 0 1px var(--pl-line);
  transform: translateX(calc(var(--i) * 100%)); transition: transform .45s var(--pl-spring);
}
.pl-seg button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 0;
  border: 0; background: transparent; padding: 8px 10px; border-radius: var(--r-pill); cursor: pointer;
  font: inherit; font-size: 14px; font-weight: 600; line-height: 1.2; color: var(--pl-muted); white-space: nowrap;
  transition: color .2s ease;
}
.pl-seg button:hover { color: var(--pl-ink); }
.pl-seg button[aria-checked="true"] { color: var(--pl-ink); }
.pl-seg button:focus-visible { outline: 2px solid var(--pl-blue); outline-offset: 2px; }

/* Starter: the plan is chosen from rows with a dot, never from the term pill */
.pl-pick { grid-row: span 2; align-self: start; display: grid; gap: 8px; padding-bottom: 20px; }
.pl-opt {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; width: 100%;
  padding: 13px 14px; border: 0; border-radius: var(--r-lg); background: transparent; cursor: pointer; text-align: left;
  font: inherit; color: var(--pl-ink); box-shadow: inset 0 0 0 1px var(--pl-line);
  transition: box-shadow .25s ease, background-color .25s ease;
}
.pl-opt:hover { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--pl-ink) 30%, transparent); }
.pl-opt[aria-checked="true"] { background: var(--pl-blue-soft); box-shadow: inset 0 0 0 1.5px var(--pl-blue); }
.pl-opt:focus-visible { outline: 2px solid var(--pl-blue); outline-offset: 2px; }
.pl-dot { width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--pl-line); transition: box-shadow .25s var(--pl-spring); }
.pl-opt[aria-checked="true"] .pl-dot { box-shadow: inset 0 0 0 5px var(--pl-blue); }
.pl-opt-name { font-size: 15px; font-weight: 600; }
.pl-opt-price { font-size: 13px; color: var(--pl-muted); white-space: nowrap; }
.pl-opt-price b { font-family: var(--pl-display); font-size: 22px; font-weight: 600; letter-spacing: -.02em; color: var(--pl-ink); margin-right: 3px; font-variant-numeric: tabular-nums; }
.pl-pick .pl-per { margin: 4px 0 0; }
.pl-seg-note { align-self: center; margin: 0; padding: 8px 0; font-size: 14px; color: var(--pl-muted); }

/* the price: big number, the term beside it, the month under it */
.pl-price { padding: 22px 0 20px; }
.pl-amount-row { margin: 0; display: flex; align-items: center; gap: 10px; }
.pl-amount { font-family: var(--pl-display); font-weight: 600; font-size: 64px; line-height: .9; letter-spacing: -.045em; color: var(--pl-ink); font-variant-numeric: tabular-nums; }
.pl-unit { font-size: 13.5px; line-height: 1.25; font-weight: 600; color: var(--pl-muted); white-space: pre-line; }
.pl-per { margin: 10px 0 0; font-size: 13.5px; color: var(--pl-muted); font-variant-numeric: tabular-nums; }
.is-rolling { display: inline-block; animation: pl-roll .32s var(--pl-ease); }
p.is-rolling { display: block; }
@keyframes pl-roll { from { opacity: 0; transform: translateY(7px); filter: blur(2px); } to { opacity: 1; transform: none; filter: none; } }

/* Spy and Max (D28): the credits on one row under the price, the pack switch on its right
   (after the founder's reference card). Max says « Pay as you go » in the price's place. */
.pl-price.is-payg .pl-amount { font-size: 44px; line-height: 1; letter-spacing: -.035em; }
.pl-credbox { display: flex; flex-direction: column; gap: 10px; padding-bottom: 20px; }
.pl-credits { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pl-credits-text { font-size: 14.5px; font-weight: 600; color: var(--pl-ink); font-variant-numeric: tabular-nums; }
.pl-credits-side { font-size: 13.5px; color: var(--pl-muted); }
.pl-credits .pl-seg { flex: none; }
.pl-credits .pl-seg button { padding: 6px 12px; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.pl-credits-note { margin: 0; font-size: 13px; line-height: 1.4; color: var(--pl-muted); text-wrap: pretty; }

.pl-cta { display: flex; flex-direction: column; gap: 8px; }
.pl-cta > button { width: 100%; }

/* what the plan has */
.pl-list { padding-top: 24px; margin-top: 24px; border-top: 1px solid var(--pl-line); display: flex; flex-direction: column; align-content: start; }
.pl-head { margin: 0 0 12px; font-size: 13px; font-weight: 600; color: var(--pl-muted); }
.pl-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.pl-lines li { display: flex; align-items: flex-start; gap: 10px; font-size: 14.5px; line-height: 1.4; color: var(--pl-ink); transition: color .25s ease; }
.pl-li-text { min-width: 0; text-wrap: pretty; }
.pl-ic {
  position: relative; flex: none; width: 18px; height: 18px; margin-top: 1px; border-radius: 50%;
  display: grid; place-items: center; background: var(--pl-blue); color: #fff;
  transition: background-color .25s ease, box-shadow .25s ease;
}
.pl-ic svg { width: 14px; height: 14px; transition: opacity .2s ease, transform .3s var(--pl-spring); }
.pl-ic::after { content: ''; position: absolute; width: 7px; height: 1.6px; border-radius: 1px; background: currentColor; opacity: 0; transition: opacity .2s ease; }
.pl-lines li.is-off, .pl-lines li.is-soon { color: var(--pl-muted); }
.pl-lines li.is-off .pl-ic, .pl-lines li.is-soon .pl-ic { background: transparent; box-shadow: inset 0 0 0 1.5px var(--pl-line); color: var(--pl-muted); }
.pl-lines li.is-off .pl-ic svg { opacity: 0; transform: scale(.4); }
.pl-lines li.is-off .pl-ic::after { opacity: 1; }
.pl-lines li.is-soon .pl-ic svg { opacity: .55; }
/* What the plan does not have (Spy: what Max adds), a grey cross (founder, 24/10 evening). */
.pl-lines li.is-no { color: var(--pl-muted); }
.pl-lines li.is-no .pl-ic { background: transparent; box-shadow: inset 0 0 0 1.5px var(--pl-line); color: var(--pl-muted); }
.pl-lines li.is-no .pl-ic svg { display: none; }
.pl-lines li.is-no .pl-ic::before, .pl-lines li.is-no .pl-ic::after { content: ''; position: absolute; width: 8px; height: 1.6px; border-radius: 1px; background: currentColor; opacity: 1; transform: rotate(45deg); }
.pl-lines li.is-no .pl-ic::after { transform: rotate(-45deg); }
.pl-tag { margin-left: auto; flex: none; padding: 2px 8px; border-radius: var(--r-pill); font-size: 11.5px; font-weight: 600; line-height: 1.45; background: var(--pl-band); color: var(--pl-blue-ink); }
.pl-soon-lines { margin-top: 12px; }

/* Starter Plus: what it adds sits in place and lights up when chosen */
.pl-adds { margin: 16px 0 0; padding: 14px 14px; border-radius: var(--r-lg); box-shadow: inset 0 0 0 1px transparent; transition: background-color .3s ease, box-shadow .3s ease; }
.pl-adds .pl-head { margin-bottom: 10px; transition: color .25s ease; }
.pl-adds.is-on { background: var(--pl-blue-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--pl-blue) 22%, transparent); }
.pl-adds.is-on .pl-head { color: var(--pl-blue-ink); }

/* Pro: the landing page's navy card, in every theme */
.pl-card.is-featured {
  --pl-ink: #FFFFFF; --pl-body: #B7BEDA; --pl-muted: #A3ABCB; --pl-line: rgb(255 255 255 / .13);
  --pl-band: rgb(255 255 255 / .08); --pl-thumb: rgb(255 255 255 / .16); --pl-blue: #5C77F2; --pl-blue-ink: #DCE2FF; --pl-blue-soft: rgb(255 255 255 / .1);
  background: #151E4A;
  box-shadow: 0 0 0 1px rgb(120 145 255 / .28), 0 30px 60px -30px rgb(21 30 74 / .7);
}
.pl-card.is-featured:hover { box-shadow: 0 0 0 1px rgb(140 165 255 / .5), 0 30px 60px -30px rgb(21 30 74 / .8); }
.pl-card.is-featured .pl-badge { background: #FFFFFF; color: #151E4A; }
.pl-card.is-featured .pl-seg::before { box-shadow: 0 1px 2px rgb(0 0 0 / .25); }

/* ---- agencies: a band under the cards, the same shape as the comparison bar ---- */
.pl-contact {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 12px 12px 20px;
  border-radius: var(--r-xl); background: var(--pl-card); box-shadow: 0 0 0 1px var(--pl-line);
  font-size: 14.5px; font-weight: 600; color: var(--pl-ink);
}
.pl-contact-btn {
  display: inline-flex; align-items: center; padding: 8px 16px; border-radius: var(--r-lg);
  box-shadow: inset 0 0 0 1px var(--pl-line); color: var(--pl-ink); text-decoration: none; font-size: 14px; font-weight: 600;
  transition: background-color .2s ease;
}
.pl-contact-btn:hover { background: var(--pl-band); }
.pl-contact-btn:focus-visible { outline: 2px solid var(--pl-blue); outline-offset: 2px; }

/* ---- the comparison table, closed by default ---- */
.pl-compare { border-radius: var(--r-xl); background: var(--pl-card); box-shadow: 0 0 0 1px var(--pl-line); }
.pl-compare summary {
  list-style: none; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 16px 20px;
  font-size: 14.5px; font-weight: 600; color: var(--pl-ink); cursor: pointer; border-radius: var(--r-xl);
}
.pl-compare summary::-webkit-details-marker { display: none; }
.pl-compare summary svg { width: 16px; height: 16px; color: var(--pl-muted); transition: transform .3s var(--pl-ease); }
.pl-compare[open] summary svg { transform: rotate(180deg); }
.pl-compare summary:focus-visible { outline: 2px solid var(--pl-blue); outline-offset: 2px; }
.pl-compare[open] .pl-table-wrap { animation: pl-in .35s var(--pl-ease); }
.pl-table-wrap { overflow-x: auto; padding: 0 8px 12px; }
.pl-table-wrap:focus-visible { outline: 2px solid var(--pl-blue); outline-offset: -2px; }
.pl-table { width: 100%; min-width: 620px; border-collapse: collapse; font-size: 14px; }
.pl-table th, .pl-table td { padding: 11px 12px; text-align: center; border-top: 1px solid var(--pl-line); }
.pl-table th[scope="row"] { text-align: left; font-weight: 500; color: var(--pl-ink); width: 34%; }
.pl-table thead th { border-top: 0; vertical-align: bottom; padding-top: 4px; }
.pl-th-name { display: block; font-family: var(--pl-display); font-size: 16px; font-weight: 600; color: var(--pl-ink); }
.pl-th-price { display: block; margin-top: 2px; font-size: 12.5px; font-weight: 500; color: var(--pl-muted); }
.pl-table .is-featured { background: var(--pl-blue-soft); }
.pl-table thead .is-featured { border-radius: var(--r-lg) var(--r-lg) 0 0; background: #151E4A; padding-top: 12px; padding-bottom: 12px; }
.pl-table thead .is-featured .pl-th-name { color: #FFFFFF; }
.pl-table thead .is-featured .pl-th-price { color: #B7BEDA; }
.pl-soon-row th[scope="row"] { vertical-align: top; }
.pl-soon-row th .pl-tag { margin: 0 6px 0 0; }
.pl-soon-row td { vertical-align: top; }
.pl-soon-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 12.5px; line-height: 1.35; color: var(--pl-muted); }
.pl-table tr.pl-group th { padding-top: 22px; font-size: 12.5px; font-weight: 600; text-align: left; color: var(--pl-muted); }
.pl-yes { display: inline-flex; }
.pl-yes .pl-ic { margin: 0; }
.pl-no { color: var(--pl-muted); }
.pl-val { font-weight: 600; color: var(--pl-ink); font-variant-numeric: tabular-nums; }
.pl-table .pl-tag { margin: 0; }
.pl-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- phones: one column, Pro first ---- */
@media (max-width: 860px) {
  .pl-grid { grid-template-columns: minmax(0, 1fr); }
  .pl-card { grid-row: auto; display: flex; flex-direction: column; padding: 24px 20px 22px; }
  .pl-card.is-featured { order: -1; }
  .pl-seg { align-self: stretch; }
  .pl-pick { align-self: stretch; padding-bottom: 18px; }
  .pl-amount { font-size: 56px; }
  .pl-price.is-payg .pl-amount { font-size: 38px; }
  .pl-table th[scope="row"] { position: sticky; left: 0; z-index: 1; background: var(--pl-card); min-width: 150px; }
}

@media (prefers-reduced-motion: reduce) {
  .pl-card, .pl-seg::before, .is-rolling, .pl-ic, .pl-ic svg, .pl-adds, .pl-compare summary svg, .pl-compare[open] .pl-table-wrap { animation: none; transition: none; }
}
