/* Cogniverse — /pricing.
 *
 * Loaded after styles.css and legal.css: the page reuses the secondary pages'
 * header, footer and title, and adds the three plan cards. The landing's own
 * tokens (--ink, --surface-2…) are scoped to its generated .c0 wrapper and do
 * not reach this page, so the few this file needs are declared on .pr-page.
 *
 * Each card has the same two halves, top to bottom: the plan (name, price, one
 * caption, its button) and what it includes. The halves line up across the
 * three cards because the top is a fixed grid of rows (subgrid where the
 * browser has it), so the three buttons sit on one line whatever each caption
 * says.
 *
 * Pro carries the one choice on the page — monthly or yearly — as a switch on
 * its own price, YEARLY by default. The page states it was €10 (struck) beside
 * the €8, and the total that is actually billed. */

.pr-page {
  --pr-surface: #121826;
  --pr-surface-2: #1A202E;
  --pr-line: #262D3B;
  --pr-line-2: #323A48;
  --pr-ink: var(--fg1);
  --pr-ink-2: var(--fg2);
  --pr-muted: var(--fg3);
  --pr-blue: #135BEC;
  --pr-sky: #5B8DEF;
}

/* Header, main and footer share the wider measure, as on /demo. */
.pr-page .lg-wrap {
  max-width: 1120px;
}

.pr-hdr {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 18px;
}

.pr-hdr-login {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--pr-ink-2);
  text-decoration: none;
}

.pr-hdr-login:hover {
  color: var(--pr-ink);
}

.pr-hdr-register {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--pr-line-2);
  border-radius: 8px;
  color: var(--pr-ink);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background .18s ease;
}

.pr-hdr-register:hover {
  background: var(--pr-line);
  color: var(--pr-ink);
}

.pr-title {
  max-width: 16em;
  text-wrap: balance;
}

.pr-lede {
  margin: 16px 0 0;
  max-width: 38em;
  font-family: var(--font-serif);
  font-size: clamp(16px, 1.3vw, 18.5px);
  line-height: 1.55;
  color: var(--pr-ink-2);
  text-wrap: pretty;
}

/* ── the three cards ─────────────────────────────────────────────────── */

.pr-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  /* Rows of every card: the top, then what it includes. */
  grid-template-rows: auto auto;
  gap: 0 16px;
  margin-top: clamp(36px, 6vh, 60px);
}

.pr-card {
  display: grid;
  grid-row: span 2;
  grid-template-rows: subgrid;
  border: 1px solid var(--pr-line);
  border-radius: 16px;
  background: var(--pr-surface);
  overflow: hidden;
}

.pr-card[data-featured] {
  border-color: rgba(19, 91, 236, .55);
  background: var(--pr-surface-2);
  box-shadow: 0 0 0 1px rgba(19, 91, 236, .18), 0 24px 60px -30px rgba(19, 91, 236, .45);
}

.pr-top {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 28px 28px 26px;
  border-bottom: 1px solid var(--pr-line);
}

.pr-name {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-family: var(--font-sans);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -.02em;
  color: var(--pr-ink);
}

.pr-tag {
  flex: none;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(19, 91, 236, .18);
  color: #8FB4F7;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.pr-price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin-top: 6px;
}

.pr-amount {
  font-family: var(--font-display);
  font-size: clamp(38px, 3.6vw, 48px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.035em;
  color: var(--pr-ink);
}

.pr-was {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -.02em;
  color: var(--pr-muted);
  text-decoration-thickness: 2px;
}

.pr-per {
  font-size: 14px;
  font-weight: 500;
  color: var(--pr-muted);
}

.pr-cap {
  margin: 0;
  min-height: 1.45em;
  font-size: 13px;
  line-height: 1.45;
  color: var(--pr-muted);
}

.pr-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.pr-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: auto;
  min-height: 46px;
  padding: 11px 20px;
  border: 1px solid var(--pr-line-2);
  border-radius: 10px;
  background: #0B1019;
  color: var(--pr-ink);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: background .18s ease, border-color .18s ease;
}

.pr-cta:hover {
  background: var(--pr-line);
  color: var(--pr-ink);
}

.pr-cta[data-primary] {
  border-color: transparent;
  background: var(--pr-blue);
  color: #fff;
}

.pr-cta[data-primary]:hover {
  background: var(--primary-hover);
}

.pr-cta:focus-visible,
.pr-switch button:focus-visible,
.pr-hdr a:focus-visible {
  outline: 2px solid var(--pr-blue);
  outline-offset: 3px;
}

/* The button sits at the bottom of the top half (margin-top: auto above), so
   the three share a line: Pro's price block (switch + price + caption) is the
   tallest, and the others' buttons drop to meet it. */
.pr-top > .pr-cap,
.pr-top > .pr-billing {
  margin-bottom: 8px;
}

.pr-body {
  padding: 24px 28px 30px;
}

.pr-lede-card {
  margin: 0 0 16px;
  font-family: var(--font-serif);
  font-size: 16.5px;
  line-height: 1.45;
  color: var(--pr-ink);
}

.pr-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--pr-ink-2);
}

.pr-list li {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.pr-check {
  margin-top: 2px;
  color: var(--pr-sky);
}

.pr-note {
  margin: clamp(24px, 3.5vh, 36px) 0 0;
  max-width: 52em;
  font-size: 13px;
  line-height: 1.55;
  color: var(--pr-muted);
}

/* ── Pro: monthly / yearly ───────────────────────────────────────────── */

.pr-billing {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Only the period chosen is drawn. Without JavaScript data-billing stays
   "yearly", the switch stays hidden, and the card reads as the default. */
.pr-billing[data-billing="yearly"] [data-show="monthly"],
.pr-billing[data-billing="monthly"] [data-show="yearly"] {
  display: none;
}

.pr-switch {
  display: inline-flex;
  align-self: flex-start;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--pr-line-2);
  border-radius: 999px;
  background: #0B1019;
}

.pr-switch[hidden] {
  display: none;
}

.pr-switch button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--pr-ink-2);
  font: 600 12.5px/1 var(--font-sans);
  cursor: pointer;
  transition: background .18s ease, color .18s ease;
}

.pr-switch button:hover {
  color: var(--pr-ink);
}

.pr-switch button[aria-checked="true"] {
  background: var(--pr-line-2);
  color: var(--pr-ink);
}

.pr-save {
  color: #8FB4F7;
  font-weight: 600;
}

/* Three 1fr tracks hold to ~960px; below that a card is narrower than its own
   price line, so the cards stack, Pro last as on the wide layout. */
@media (max-width: 959px) {
  .pr-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    gap: 16px;
    max-width: 520px;
  }

  .pr-card {
    grid-row: auto;
    grid-template-rows: auto auto;
  }
}

@media (max-width: 599px) {
  .pr-hdr-register {
    display: none;
  }
}
