/* Pricing. Added 2026-08-31, after the owner lifted the brief's ban on naming
 * a price. See web/REDESIGN-BRIEF.md for the grant and the four approved tiers.
 *
 * The paid tiers carry a เร็ว ๆ นี้ pill instead of a checkout button, because
 * there is no payment system behind them: src/ has an optional `plan` string on
 * a quota row and nothing else. A button that goes nowhere is the same defect
 * as a link to a host that does not exist. */

.pricing-page { background: var(--ground); color: var(--ink); }

main > section { padding-block: 0 var(--sec); }

.price-intro { padding-top: clamp(3rem, 7vh, 5rem); }
.price-intro h1 { max-width: 14em; }
.price-intro .lede { margin-top: 1.4rem; color: var(--muted); font-size: 1.05rem; max-width: 36rem; }
.price-note { margin-top: 1rem; color: var(--ink-soft); font-size: .92rem; max-width: 36rem; }

.price-table {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
  gap: 1rem;
}

.tier {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--ring);
  padding: 1.6rem 1.4rem;
}
.tier--lead { background: var(--panel); box-shadow: inset 0 0 0 1px var(--accent); }

.tier-head { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.tier-head h2 { font-size: 1.35rem; font-weight: 400; letter-spacing: -.01em; }
.tier-tag {
  border-radius: var(--r-pill);
  background: var(--accent);
  color: var(--ground);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .04em;
  padding: .18rem .55rem;
}
.tier-for { width: 100%; margin-top: .15rem; color: var(--muted); font-size: .84rem; }

.tier-price { margin-top: 1.5rem; display: flex; align-items: baseline; gap: .4rem; }
.tier-price b {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(2rem, 3.4vw, 2.7rem);
  letter-spacing: -.035em;
  line-height: 1;
}
.tier-price span { color: var(--muted); font-size: .84rem; }
.tier-unit { margin-top: .5rem; color: var(--ink-soft); font-size: .88rem; font-weight: 600; }

.tier-list { flex: 1; margin: 1.4rem 0 1.5rem; padding: 0; list-style: none; }
.tier-list li {
  display: flex;
  align-items: baseline;
  gap: .55rem;
  padding: .5rem 0;
  border-bottom: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.55;
}
.tier-list li:last-child { border-bottom: 0; }
.tier-list li::before {
  content: '';
  flex: none;
  width: .3rem;
  height: .3rem;
  border-radius: 50%;
  background: var(--accent);
  transform: translateY(-.2em);
}
.tier .button { text-align: center; }
.tier .soon { align-self: flex-start; }
.tier-foot { margin-top: .8rem; color: var(--muted); font-size: .78rem; line-height: 1.55; }

.price-status {
  border-radius: var(--r-md);
  background: transparent;
}
.price-status p {
  max-width: 46rem;
  border-left: 3px solid var(--bear-yellow);
  border-radius: var(--r-sm);
  background: color-mix(in srgb, var(--bear-yellow) 9%, var(--surface));
  color: var(--ink-soft);
  font-size: .92rem;
  line-height: 1.7;
  padding: .9rem 1.1rem;
}
.price-status b { color: var(--ink); }

.price-compare h2, .price-faq h2, .price-cta h2 { margin-bottom: 1.8rem; }
.compare-scroll { overflow-x: auto; border-radius: var(--r-md); box-shadow: var(--ring); background: var(--surface); }
.price-compare table { width: 100%; min-width: 40rem; border-collapse: collapse; font-size: .9rem; }
.price-compare th, .price-compare td { padding: .8rem 1rem; text-align: left; border-bottom: 1px solid var(--line-soft); }
.price-compare thead th { color: var(--muted); font-size: .74rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.price-compare tbody th { color: var(--ink); font-weight: 400; }
.price-compare td { color: var(--muted); }
.price-compare tbody tr:last-child th, .price-compare tbody tr:last-child td { border-bottom: 0; }
.cell-soon { color: var(--ink-soft); }
.cell-soon .soon { margin-right: .5rem; }

.price-faq .faq-list { max-width: 44rem; }
.price-faq details { border-bottom: 1px solid var(--line); padding: 1.05rem 0; }
.price-faq summary {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  cursor: pointer;
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.08rem;
  line-height: 1.4;
  letter-spacing: -.018em;
  list-style: none;
}
.price-faq summary::-webkit-details-marker { display: none; }
.price-faq summary::after { content: '+'; flex: none; color: var(--muted); font-family: var(--sans); }
.price-faq details[open] summary::after { content: '–'; }
.price-faq details p { margin-top: .8rem; color: var(--muted); font-size: .93rem; max-width: 40rem; }

.price-cta { border-top: 1px solid var(--line); padding-top: var(--sec); }
.price-cta h2 { margin-bottom: .9rem; }
.price-cta > p { color: var(--muted); max-width: 34rem; }

@media (max-width: 66rem) {
  .price-table { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 40rem) {
  .price-table { grid-template-columns: minmax(0, 1fr); }
  .site-head nav a:not(.small-cta) { display: none; }
}
