/* The pricing page (/pricing.html), boards C1 / C1d / C5: the eyebrow and a two-tone title, the Monthly / Yearly pill, three cards (One plan, Plus,
   Pro) and the consent box. A phone: a tap picks a card and one bar at the bottom holds the tick and the red button; a wide screen: a button in
   each card and the tick under them. Builds on app.css (colours, header, .btn) and offer.css (the round account button, the credits pill, the
   consent box). Logical properties only. */

.pricing-page {
  --pr-soft: #f7f8fa; --pr-ok: #1b7a3a; --pr-ok-bg: #e6f4ea; --pr-shadow: rgb(29 31 35 / 0.5);
  background: var(--paper); color: var(--ink);
}
@media (prefers-color-scheme: dark) { .pricing-page { --pr-soft: #181b1f; --pr-ok: #7fd69a; --pr-ok-bg: #1f3a29; --pr-shadow: rgb(0 0 0 / 0.7); } }
.price-main {
  --o-ink: var(--ink); --o-soft: var(--muted); --o-line: var(--line); --o-ctl: var(--control); --o-accent: var(--accent); --o-on-accent: var(--on-accent);
  --o-fill: var(--accent-fill); --o-fill-top: var(--accent-top); --o-fill-deep: var(--accent-deep); --o-btn-top: var(--btn-top); --o-btn-bottom: var(--btn-bottom);
  padding-block: 1.5rem 3rem; display: grid; gap: 1rem; justify-items: center; text-align: center; min-inline-size: 0;
}
.price-main > * { min-inline-size: 0; }
/* a phone reads from the start edge (boards C1, C2): the heading, the lead, the notes; the wide screen centres them */
@media (max-width: 55.99em) { .price-main { justify-items: stretch; text-align: start; } .price-trust { justify-content: flex-start; } }
/* the bar at the bottom of a phone covers the end of the page: room for it */
.price-main.has-bar { padding-block-end: calc(13rem + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 56em) { .price-main.has-bar { padding-block-end: 3rem; } }
.price-eyebrow { margin: 0; display: flex; align-items: center; gap: 0.75rem; color: var(--accent); font-size: 0.8rem; font-weight: 750; letter-spacing: 0.14em; text-transform: uppercase; }
.price-eyebrow::before { content: ""; flex: none; inline-size: 3rem; block-size: 0.6rem; border-inline: 2px solid currentColor; background: linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat; }
:lang(ar) .price-eyebrow, :lang(ja) .price-eyebrow, :lang(zh) .price-eyebrow { letter-spacing: 0; }
.price-main h1 { margin: 0; font-size: clamp(2rem, 8vw, 3.25rem); font-weight: 820; line-height: 1.06; letter-spacing: -0.035em; }
.price-main h1 em { color: var(--accent); font-style: normal; }
.price-lead { margin: 0; color: var(--muted); font-size: 1.05rem; line-height: 1.45; max-inline-size: 40rem; }
.price-main .fine { margin: 0; font-size: 0.9rem; line-height: 1.45; color: var(--muted); max-inline-size: 46rem; }
.price-main [hidden] { display: none !important; }
.price-status { font-weight: 600; color: var(--ink); }
.price-main .price-status.is-need { color: var(--accent); font-weight: 700; }
.price-consent { max-inline-size: 36rem; justify-self: center; }
.price-consent .soon-consent, .price-bar .soon-consent { margin: 0; padding: 10px 12px; border: 2px solid transparent; border-radius: 14px; background: var(--pr-soft); text-align: start; }
.price-consent .soon-consent.is-needed, .price-bar .soon-consent.is-needed { border-color: var(--accent); }
.soon-consent-box { inline-size: 22px; block-size: 22px; }
.price-trust { margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem 1.2rem; color: var(--muted); font-size: 0.85rem; font-weight: 600; }
.price-trust > span { display: inline-flex; align-items: center; gap: 0.45rem; }
.price-trust svg { flex: none; inline-size: 16px; block-size: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Monthly / Yearly: a pill tray, the pressed one is dark */
.bill-toggle { display: flex; inline-size: 100%; max-inline-size: 24rem; gap: 4px; padding: 4px; border-radius: 999px; background: var(--raised); border: 1px solid var(--line); }
.bill-toggle button {
  flex: 1 1 0; min-block-size: 44px; padding-inline: 0.8rem; border: 0; border-radius: 999px; background: transparent; color: var(--muted);
  font: inherit; font-weight: 700; cursor: pointer;
}
.bill-toggle button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.bill-toggle button:focus-visible, .tier-card .btn:focus-visible, .tier-link:focus-visible, .price-bar .btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* the cards: one column on a phone, three from 56em */
.tier-cards { display: grid; gap: 1rem; inline-size: 100%; grid-template-columns: minmax(0, 1fr); align-items: start; text-align: start; }
@media (min-width: 56em) { .tier-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.4rem; align-items: stretch; margin-block-start: 0.6rem; } }
.tier-card {
  position: relative; display: flex; flex-direction: column; gap: 0.6rem; padding: 1rem; border: 1px solid var(--line); border-radius: 20px; background: var(--raised); min-inline-size: 0; cursor: pointer;
}
.tier-card.is-selected { border: 2px solid var(--accent); padding: calc(1rem - 1px); box-shadow: 0 24px 50px -34px rgb(198 40 40 / 0.7); }
.tier-card.is-current { border-color: var(--accent); }
.tier-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.3rem 0.8rem; }
.tier-head { display: flex; align-items: center; flex-wrap: wrap; gap: 0.3rem 0.7rem; }
.tier-name { margin: 0; font-size: 1.15rem; font-weight: 820; line-height: 1.2; letter-spacing: -0.02em; }
.tier-radio { flex: none; inline-size: 24px; block-size: 24px; border-radius: 50%; border: 2px solid var(--control); background: var(--raised); }
.tier-card.is-selected .tier-radio { border: 7px solid var(--accent); }
.tier-pick:focus-visible + .tier-radio { outline: 3px solid var(--accent); outline-offset: 2px; }
.tier-badge, .tier-tag { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; border-radius: 999px; padding: 0.2rem 0.65rem; white-space: nowrap; }
.tier-badge { color: var(--on-accent); background: var(--accent-fill); }
.tier-tag { color: #14592a; background: var(--pr-ok-bg); text-transform: none; letter-spacing: 0; font-size: 0.8rem; }
@media (prefers-color-scheme: dark) { .tier-tag { color: #7fd69a; } }
.tier-price { margin: 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.25rem; margin-inline-start: auto; }
.tier-price strong { font-size: 1.6rem; font-weight: 850; letter-spacing: -0.03em; line-height: 1.1; }
.tier-unit { color: var(--muted); font-size: 0.9rem; font-weight: 600; }
.tier-note { margin: 0; color: var(--muted); font-size: 0.88rem; line-height: 1.4; }
.tier-act { display: grid; gap: 0.5rem; }
.tier-act .btn { inline-size: 100%; min-block-size: 50px; box-sizing: border-box; border-radius: 999px; font: inherit; font-weight: 700; font-size: 1.05rem; }
.price-bar .btn-primary, .tier-card .btn-primary { box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.28), 0 10px 24px -12px rgb(198 40 40 / 0.7); }
.tier-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.tier-list li { display: flex; gap: 0.6rem; line-height: 1.4; font-size: 0.92rem; }
.tier-mark { flex: none; inline-size: 1rem; font-weight: 700; }
.tier-list .is-yes .tier-mark { color: var(--pr-ok); }
.tier-list .is-no { color: var(--muted); }
.tier-list .is-no .tier-mark { color: var(--control); }
.tier-link { margin-inline-start: 0.5rem; color: var(--ink); font-weight: 650; text-underline-offset: 0.2em; }

/* a phone: the button of a card is in the bar */
@media (max-width: 55.99em) {
  .tier-card .tier-act { display: none; }
  .tier-card .tier-badge { order: 3; }
}
/* a wide screen: no radio, a big price, the button, a divider, the list; Plus carries the red frame and the badge on its edge */
@media (min-width: 56em) {
  .tier-card { cursor: default; padding: 1.5rem; gap: 0.7rem; }
  .tier-card.is-selected { border: 1px solid var(--line); padding: 1.5rem; box-shadow: none; }
  .tier-card.is-featured { border: 2px solid var(--accent); padding: calc(1.5rem - 1px); box-shadow: 0 24px 50px -34px rgb(198 40 40 / 0.7); }
  .tier-card.is-current { border: 2px solid var(--accent); padding: calc(1.5rem - 1px); }
  .tier-radio, .tier-pick { display: none; }
  .tier-top { display: contents; }
  .tier-head { order: 1; }
  .tier-name { font-size: 1.35rem; }
  .tier-badge { position: absolute; inset-block-start: -0.9rem; inset-inline-start: 1.2rem; padding: 0.3rem 0.8rem; }
  .tier-tag { align-self: center; }
  .tier-card > .tier-note:not(.is-billed) { order: 2; font-size: 0.95rem; }
  .tier-price { order: 3; margin-inline-start: 0; }
  .tier-price strong { font-size: 2.75rem; }
  .tier-card > .tier-note.is-billed { order: 4; }
  .tier-card > .tier-act { order: 5; }
  .tier-card > .tier-list { order: 6; padding-block-start: 1rem; border-block-start: 1px solid var(--line); gap: 0.7rem; margin-block-start: 0.3rem; }
  .tier-list li { font-size: 0.95rem; }
}

/* the bar of a phone (boards C1, C5): the tick, one red button, what happens after the sign-in */
.price-bar {
  position: fixed; inset-inline: 0; inset-block-end: 0; z-index: 20; display: grid; gap: 10px; padding: 12px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  background: var(--raised); border-block-start: 1px solid var(--line); box-shadow: 0 -14px 30px -20px rgb(0 0 0 / 0.35);
}
.price-bar [hidden], .price-bar[hidden] { display: none !important; }
@media (min-width: 56em) { .price-bar { display: none; } }
.price-bar-box { display: grid; gap: 8px; text-align: start; }
.price-bar-box .price-status { margin: 0; }
.price-bar-act .tier-act { display: grid; }
.price-bar-note { margin: 0; text-align: center; color: var(--muted); font-size: 0.85rem; }
