/* Pricing page layout (docs/specs/pricing-page.md). No colors of its own. */

.lp-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
  min-width: 0;
  padding-block: var(--space-32) var(--space-16);
}

.lp-page > * {
  min-width: 0;
}

.lp-intro {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-16);
  margin-bottom: var(--space-16);
}

/* Focused when checkout closes, or the target of /pricing?plan=x#plan-x, of the app's and the closed
   card's #compare link (NX-150, NX-169), of the closed intro's #today link (NX-169), of the footer's
   #seller link or of an older #paid-plans-open link (NX-147); keep it clear of the sticky header. */
[data-checkout-notice],
.lp-plan[id],
#compare,
#today,
#seller,
details[id] {
  scroll-margin-top: calc(var(--topbar-height) + var(--space-16));
}

.lp-intro__copy {
  display: flex;
  flex-direction: column;
  gap: var(--space-10);
  min-width: 0;
  flex: 1 1 16rem;
}

.lp-ladder {
  display: flex;
  flex-direction: column;
  margin-top: var(--space-20);
  overflow: hidden;
  border: var(--border-hairline) solid var(--c-line);
  border-radius: var(--radius-xl);
  background: var(--c-surface);
}

.lp-plan {
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
  min-width: 0;
  padding: var(--space-16);
}

.lp-plan + .lp-plan {
  border-top: var(--border-hairline) solid var(--c-line);
}

.lp-plan--highlight {
  position: relative;
  background: color-mix(in srgb, var(--c-mark) 7%, var(--c-surface));
}

.lp-plan--highlight::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--c-mark);
}

.lp-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-8);
  margin: 0;
}

.lp-price__amount {
  font-family: var(--font-body);
  font-size: 2.1rem;
  font-weight: var(--weight-heavy);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.lp-points {
  margin: 0;
  padding: 0;
  list-style: none;
}

.lp-points li {
  position: relative;
  padding-left: var(--space-14);
  color: var(--c-ink-2);
  font-size: var(--text-s);
  line-height: 1.45;
}

.lp-points li + li {
  margin-top: var(--space-6);
}

.lp-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  background: var(--c-ink-2);
}

.lp-plan__action {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
  margin-top: auto;
}

.lp-plan .c-btn {
  width: 100%;
}

.lp-yours {
  margin: 0;
  font-weight: var(--weight-semibold);
}

.lp-checkout {
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
  margin-top: var(--space-4);
  padding-top: var(--space-12);
  border-top: var(--border-hairline) solid var(--c-line);
}

.lp-checkout[hidden] {
  display: none;
}

.lp-checkout__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-8);
}

.lp-check {
  display: flex;
  align-items: flex-start;
  gap: var(--space-10);
}

.lp-check input {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.2rem;
  accent-color: var(--c-action);
  flex: none;
}

.lp-check label {
  font-size: var(--text-s);
  line-height: 1.45;
}

.lp-check a {
  color: var(--c-ink);
  font-weight: var(--weight-medium);
}

.lp-seller h2 {
  font-size: var(--text-title);
  font-weight: var(--weight-bold);
  line-height: var(--leading-snug);
}

.lp-seller p,
.lp-seller li {
  color: var(--c-ink-2);
  font-size: var(--text-s);
  line-height: 1.45;
}

.lp-seller ul {
  margin: var(--space-8) 0 0;
  padding-left: var(--space-20);
}

.lp-seller li + li {
  margin-top: var(--space-6);
}

.lp-seller a {
  color: var(--c-ink);
  font-weight: var(--weight-medium);
}

.lp-seller .note {
  margin-bottom: var(--space-12);
  padding: var(--space-12);
  border: var(--border-hairline) solid var(--c-line);
  border-radius: var(--radius-m);
}

.lp-table {
  max-width: 100%;
  min-width: 0;
  margin-top: var(--space-16);
}

.lp-table table {
  width: 100%;
  border-collapse: collapse;
}

.lp-table th,
.lp-table td {
  padding: var(--space-10) var(--space-12);
  border-bottom: var(--border-hairline) solid var(--c-line);
  text-align: left;
  vertical-align: top;
}

.lp-table thead th {
  font-weight: var(--weight-semibold);
}

.lp-table th[scope="row"] {
  font-weight: var(--weight-semibold);
}

.lp-faq {
  max-width: 66ch;
}

.lp-faq details {
  border-top: var(--border-hairline) solid var(--c-line);
  padding-block: var(--space-12);
}

.lp-faq details:last-child {
  border-bottom: var(--border-hairline) solid var(--c-line);
}

.lp-faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-12);
  min-height: var(--target-min);
  cursor: pointer;
  list-style: none;
}

.lp-faq summary::-webkit-details-marker {
  display: none;
}

.lp-faq summary::after {
  content: "+";
  flex: none;
  font-weight: var(--weight-bold);
}

.lp-faq details[open] summary::after {
  content: "\2212";
}

.lp-faq details p {
  padding-top: var(--space-8);
  max-width: 66ch;
}

#lp-checkout-dialog {
  max-height: calc(100vh - 2rem);
  max-height: calc(100dvh - 2rem);
  overflow: auto;
}

.c-dialog .lp-checkout {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

/* ------------------------------------------------------------ Proof (PX-202)
   One of Terminal's own alerts, drawn with the landing's receipt markup
   (src/landing/receipt.js). The lp-rc rules are copied from landing.css,
   which this page does not load; keep the two in step. */
.lp-proof {
  display: grid;
  gap: var(--space-16);
  scroll-margin-top: calc(var(--topbar-height) + var(--space-16));
}

.lp-proof__figure {
  min-width: 0;
}

.lp-proof__more,
.lp-proof .lp-record-note {
  margin: 0;
}

.lp-rc {
  display: grid;
  gap: var(--space-12);
  max-width: 26rem;
  margin-inline: auto;
}

.lp-rc__paper {
  padding: var(--space-24);
  border: var(--border-hairline) solid var(--c-line);
  border-radius: var(--radius-xl);
  background: var(--c-surface);
  box-shadow: var(--shadow-3);
}

.lp-rc__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-12);
  margin-bottom: var(--space-16);
}

.lp-rc__kicker {
  font: var(--weight-semibold) var(--text-label) / 1.3 var(--font-mono);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--c-mark-text);
}

.lp-livetag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-6);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--c-up-text);
}

.lp-livetag i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c-up);
}

.lp-rc__coin {
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  font-stretch: 106%;
  font-size: 1.75rem;
  line-height: 1.05;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.lp-rc__coin span {
  font: var(--weight-semibold) var(--text-s) / 1 var(--font-mono);
  color: var(--c-ink-3);
  letter-spacing: 0;
}

.lp-rc__rule {
  margin-top: var(--space-4);
  color: var(--c-ink-2);
}

.lp-rc__rows {
  display: grid;
  margin-top: var(--space-16);
}

.lp-rc__row {
  display: flex;
  justify-content: space-between;
  gap: var(--space-12);
  padding-block: var(--space-10);
  border-top: var(--border-hairline) solid var(--c-line);
  font-size: var(--text-s);
}

.lp-rc__row dt {
  color: var(--c-ink-2);
}

.lp-rc__row dd {
  text-align: right;
  font-family: var(--font-mono);
  font-stretch: var(--stretch-mono-tight);
  font-weight: var(--weight-semibold);
}

.lp-rc__row--fire dd {
  font-family: var(--font-body);
  font-weight: var(--weight-regular);
}

.lp-move.is-up { color: var(--c-up-text); }
.lp-move.is-down { color: var(--c-down-text); }
.lp-move.is-pending {
  color: var(--c-ink-3);
  font-family: var(--font-body);
  font-weight: var(--weight-regular);
}

/* The sentence exchange-primitives.md §9.4 requires wherever a record is shown. */
.lp-record-note {
  max-width: 40rem;
  padding-left: var(--space-14);
  border-left: 3px solid var(--c-line-strong);
  font-size: var(--text-s);
  color: var(--c-ink-2);
}

@media (max-width: 719px) {
  .lp-table {
    overflow-x: auto;
  }

  .lp-table table {
    min-width: 36rem;
  }

  /* A sentence across a wide row: wraps inside what a phone shows, with no swipe (NX-172). */
  .lp-table__note {
    display: block;
    max-width: min(10rem, calc(100vw - 12.5rem));
  }

  .lp-table th:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    background: var(--c-bg);
  }
}

@media (min-width: 960px) {
  .lp-ladder {
    flex-direction: row;
    align-items: stretch;
  }

  .lp-plan {
    flex: 1 1 0;
  }

  .lp-plan + .lp-plan {
    border-top: 0;
    border-left: var(--border-hairline) solid var(--c-line);
  }
}

/* Wide screens: the words on the left, the receipt on the right. */
@media (min-width: 960px) {
  .lp-proof {
    grid-template-columns: minmax(0, 1fr) 26rem;
    grid-template-rows: auto auto 1fr;
    column-gap: var(--space-32);
    align-items: start;
  }

  .lp-proof__figure {
    grid-column: 2;
    grid-row: 1 / span 3;
  }

  .lp-proof .lp-rc {
    margin-inline: 0;
  }
}

/* ------------------------------------------------------------ What works today (NX-144) */
/* Two groups, told apart by heading, icon and border style (solid vs dashed), not by color. */
.lp-today {
  display: grid;
  gap: var(--space-16);
}

.lp-today__group {
  padding: var(--space-20);
  border: var(--border-hairline) solid var(--c-line);
  border-radius: var(--radius-l);
  background: var(--c-surface);
}

.lp-today__group--later {
  border-style: dashed;
  background: transparent;
}

.lp-today__title {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  margin: 0 0 var(--space-12);
  font-size: var(--text-s);
  font-weight: var(--weight-semibold);
  color: var(--c-ink);
}

.lp-today__list {
  display: grid;
  gap: var(--space-12);
}

.lp-today__item {
  display: grid;
  gap: var(--space-4);
  font-size: var(--text-s);
  color: var(--c-ink);
  overflow-wrap: anywhere;
}

.lp-today__after {
  color: var(--c-ink-2);
}

@media (min-width: 48em) {
  .lp-today {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }
}
