/*
 * Vibe website: the Premium page. Loaded after core.css.
 *
 * Order follows the page: the opening, the one rule, the comparison, the four products, what happens when a
 * subscription ends. Each product reads as a head (name, who it is for, summary, the buy button) beside its
 * features; the product blocks are written by scripts/sync-web-shared.js from the same list `/premium` shows.
 */

/* --- opening -------------------------------------------------------------------------------- */

.intro {
  padding-top: clamp(var(--s-6), 6vw, var(--s-9));
}
.intro-title {
  max-width: 22ch;
  font-size: var(--step-4);
  font-weight: var(--light);
  line-height: var(--leading-tight);
  letter-spacing: var(--track-display);
}
.intro-title b {
  font-weight: var(--bold);
}
.intro-lede {
  max-width: 40ch;
  margin-top: var(--s-5);
  color: var(--ink-2);
  font-size: var(--step-1);
  line-height: 1.45;
}
@media (max-width: 40rem) {
  .intro-lede {
    font-size: var(--step-0);
  }
}

/* --- reading blocks: the rule, the comparison's lead-in, the ending ------------------------- */

.rule,
.compare-section,
.ending {
  margin-top: var(--s-8);
}
.rule h2,
.compare-section h2,
.ending h2 {
  font-size: var(--step-2);
  font-weight: var(--medium);
}
.rule p,
.compare-section p,
.ending p {
  max-width: var(--measure);
  margin-top: var(--s-3);
  color: var(--ink-2);
}
.rule p + p,
.ending p + p {
  margin-top: var(--s-4);
}
.rule a,
.compare-section a,
.ending a {
  color: var(--ink);
  text-decoration-color: var(--line-control);
  text-underline-offset: 0.25em;
}
.rule a:hover,
.ending a:hover {
  text-decoration-color: currentColor;
}

/* --- comparison ----------------------------------------------------------------------------- */

/* The table may be wider than a phone: it scrolls in its own box, which a keyboard can reach. */
.compare-scroll {
  margin-top: var(--s-5);
  overflow-x: auto;
  border-radius: var(--r-2);
  background: var(--surface);
  box-shadow: var(--ring);
}
.compare {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--step--1);
  text-align: left;
}
.compare th,
.compare td {
  padding: var(--s-3) var(--s-4);
  border-bottom: 1px solid var(--line);
  vertical-align: baseline;
}
.compare tbody tr:last-child > * {
  border-bottom: 0;
}
.compare thead th {
  color: var(--ink);
  font-weight: var(--bold);
}
.compare tbody th {
  color: var(--ink-2);
  font-weight: var(--regular);
}
.compare td {
  color: var(--ink);
}
@media (max-width: 40rem) {
  .compare th,
  .compare td {
    padding-inline: var(--s-2);
  }
}

/* --- products ------------------------------------------------------------------------------- */

.product {
  display: grid;
  gap: var(--s-6) var(--s-7);
  margin-top: var(--s-8);
  padding-top: var(--s-7);
  border-top: 1px solid var(--line);
}
.product-head h2 {
  font-size: var(--step-3);
  font-weight: var(--medium);
  letter-spacing: var(--track-display);
}
.product-for {
  margin-top: var(--s-2);
  color: var(--ink);
}
.product-summary {
  max-width: var(--measure);
  margin-top: var(--s-4);
  color: var(--ink-2);
}
.product-summary strong,
.feature strong,
.how strong {
  color: var(--ink);
  font-weight: var(--medium);
}
.product-buy {
  margin-top: var(--s-5);
}
/* The price is part of the label, so the label may take two lines before it overflows a narrow phone. */
.buy {
  max-width: 100%;
  padding-block: var(--s-3);
  line-height: var(--leading-snug);
  white-space: normal;
  text-align: center;
}
.product-note {
  color: var(--ink-3);
  font-size: var(--step--1);
}

.features {
  padding: 0;
  list-style: none;
}
.feature {
  padding-block: var(--s-4);
  border-top: 1px solid var(--line);
}
.feature:first-child {
  padding-top: 0;
  border-top: 0;
}
.feature h3,
.how h3,
.sets h3 {
  font-size: var(--step-0);
  font-weight: var(--medium);
}
.feature p,
.how p {
  max-width: var(--measure);
  margin-top: var(--s-1);
  color: var(--ink-2);
}
.feature code,
.how code {
  color: var(--ink);
}

.how {
  margin-top: var(--s-6);
  padding-top: var(--s-5);
  border-top: 1px solid var(--line-strong);
}
.how .how-foot {
  margin-top: var(--s-3);
  color: var(--ink-3);
  font-size: var(--step--1);
}

/* --- our sets (Vibe Appearance) ------------------------------------------------------------- */

.sets {
  margin-top: var(--s-6);
}
.set-list {
  margin-top: var(--s-3);
  padding: 0;
  list-style: none;
}
.set {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  padding-block: var(--s-2);
}
.set-name {
  flex: none;
  min-width: var(--s-8);
  color: var(--ink-2);
  font-size: var(--step--1);
}
.set-pictures {
  display: flex;
  gap: var(--s-2);
}
.set-pictures img {
  width: var(--s-7);
  height: var(--s-7);
  border-radius: var(--r-1);
  box-shadow: var(--ring);
}

@media (min-width: 56rem) {
  .product {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  }
}

/* --- forced colours -------------------------------------------------------------------------- */

@media (forced-colors: active) {
  .compare-scroll,
  .set-pictures img {
    outline: 1px solid CanvasText;
    outline-offset: -1px;
  }
}
