/* The public pricing page (SPEC.md 4.42), on the shared tokens (tokens.css): calm night, quiet card
   surfaces, Persimmon only for what to press. No glows, no colored side stripes. */

.pricing-page { background: var(--bg); color: var(--text); min-height: 100vh; position: relative; overflow-x: clip; }
.pricing-page *, .pricing-page *::before, .pricing-page *::after { box-sizing: border-box; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* The old hero glow is off: the page is calm night, like the home page. */
.glow { display: none; }
.topnav, main, .foot { position: relative; z-index: 1; }

.topnav { max-width: 1160px; margin: 0 auto; padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: var(--t-xl); letter-spacing: -0.01em; }
.brand .logo-img { display: block; height: 30px; width: auto; }
.topnav nav { display: flex; gap: 6px; }
.navlink { color: var(--text-2); text-decoration: none; font-weight: 600; font-size: var(--t-base); padding: 10px 12px; border-radius: var(--r); white-space: nowrap; transition: color 160ms, background 160ms; }
.navlink:hover { color: var(--text); background: var(--hairline); }
.navlink[hidden] { display: none; }

main { max-width: 1160px; margin: 0 auto; padding: 0 20px 72px; }

/* Hero */
.hero { text-align: center; padding: 40px 0 36px; }
.hero h1 { font-size: clamp(34px, 7vw, 62px); line-height: 1.04; letter-spacing: -0.035em; font-weight: 700; margin: 0 auto 16px; max-width: 14em; }
.lede { color: var(--text-2); font-size: clamp(16px, 2.2vw, 19px); line-height: 1.5; margin: 0 auto 28px; max-width: 34em; }
.msg { margin: 18px auto 0; max-width: 520px; padding: 12px 14px; border-radius: var(--r-lg); background: var(--surface-2); border: 1px solid var(--border); color: var(--text); }
.msg[hidden] { display: none; }

.interval { display: inline-flex; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 4px; gap: 4px; backdrop-filter: blur(6px); }
.interval button { appearance: none; border: 0; background: none; color: var(--text-2); min-height: 44px; padding: 0 18px; border-radius: var(--r); font: 600 var(--t-base)/1 var(--font); cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; transition: background 180ms, color 180ms; }
.interval button:hover { color: var(--text); }
.interval button[aria-pressed="true"] { background: var(--tab-pill); color: var(--text); box-shadow: none; }
.save { font-size: var(--t-xs); font-weight: 700; color: var(--leaf-ink); background: var(--leaf); border-radius: var(--r-full); padding: 4px 8px; line-height: 1; }

/* Groups */
.group { margin-top: 44px; }
.group-title { margin-bottom: 6px; }
.group-sub { color: var(--text-2); text-align: center; margin: 0 auto 22px; max-width: 36em; }
.group-title + .plans { margin-top: 22px; }

.plans { display: grid; gap: 16px; grid-template-columns: 1fr; align-items: stretch; }
@media (min-width: 880px) { .plans.three { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 720px) { .plans.two { grid-template-columns: repeat(2, 1fr); max-width: 820px; margin-inline: auto; } }
@media (max-width: 879px) { .plans.three { max-width: 560px; margin-inline: auto; } }
@media (max-width: 719px) { .plans.two { max-width: 560px; margin-inline: auto; } }

/* Cards */
.plan { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 28px 24px 24px; border-radius: var(--r-xl); min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: transform 200ms cubic-bezier(0.2, 0.7, 0.2, 1), border-color 200ms, box-shadow 200ms; }
.plan:hover { transform: translateY(-3px); border-color: var(--accent-line); box-shadow: none; }
.plan.featured { border-color: var(--persimmon-line); background: var(--surface); }
.plan.featured::before { content: none; }
.plan.featured:hover { border-color: var(--accent-hover); }
.plan.current { box-shadow: 0 0 0 2px var(--c-teal); }

.plan-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 28px; }
.plan-name { margin: 0; font-size: var(--t-2xl); letter-spacing: -0.01em; }
.tag { font-size: var(--t-xs); font-weight: 700; color: var(--accent-ink); background: var(--accent); border-radius: var(--r-full); padding: 5px 10px; line-height: 1; white-space: nowrap; }
.plan-for { margin: 0; color: var(--text-2); font-size: var(--t-base); line-height: 1.45; min-height: 2.9em; }

/* Prices: big and bold, the unit small beside it, on one line. */
.price { display: grid; gap: 4px; min-height: 76px; align-content: start; }
.price-line { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; transition: opacity 150ms ease, transform 150ms ease; }
.price.is-out .price-line, .price.is-out .equiv { opacity: 0; transform: translateY(6px); }
.amt { font-size: var(--t-5xl); line-height: 1; font-weight: 700; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.per { font-size: var(--t-md); color: var(--text-2); font-weight: 500; white-space: nowrap; }
.chip { font-size: var(--t-xs); font-weight: 700; color: var(--leaf-ink); background: var(--leaf); border-radius: var(--r-full); padding: 4px 9px; line-height: 1; white-space: nowrap; align-self: center; }
.chip[hidden], .equiv[hidden] { display: none; }
.equiv { margin: 0; color: var(--text-3); font-size: var(--t-sm); transition: opacity 150ms ease, transform 150ms ease; }

.rooms { display: grid; gap: 6px; font-size: var(--t-sm); color: var(--text-2); }
.rooms[hidden] { display: none; }
.rooms select { min-height: 44px; border-radius: var(--r-lg); border: 1px solid var(--border); background: var(--surface-2); color: var(--text); padding: 0 12px; font: inherit; }

/* Buttons: one line, always. The popular plan's is filled; the rest are quiet outlines. */
.pbtn { appearance: none; display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 20px; border-radius: var(--r-lg); font: 600 var(--t-lg)/1 var(--font); white-space: nowrap; text-decoration: none; cursor: pointer; width: 100%;
  border: 1px solid transparent; transition: background 160ms, border-color 160ms, transform 160ms, box-shadow 160ms, color 160ms; }
.pbtn.primary { background: var(--accent); color: var(--accent-ink); }
.pbtn.primary:hover { background: var(--accent-hover); transform: translateY(-1px); }
.pbtn.ghost { background: transparent; color: var(--text); border-color: var(--accent-line); }
.pbtn.ghost:hover { background: var(--surface-2); border-color: var(--border-strong); }
.pbtn:focus-visible, .interval button:focus-visible, .navlink:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.pbtn:disabled { opacity: 0.6; cursor: default; transform: none; }

/* Features: tight, even, flowing. Check icons, not dots. */
.feat { display: grid; gap: 10px; padding-top: 6px; border-top: 1px solid var(--border); margin-top: 4px; }
.feat-lead { margin: 10px 0 0; font-size: var(--t-sm); font-weight: 600; color: var(--text-2); }
.feat ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.feat li { display: grid; grid-template-columns: 18px 1fr; gap: 10px; align-items: start; font-size: var(--t-base); line-height: 1.4; color: var(--text); }
.feat:not(:has(.feat-lead)) ul { margin-top: 10px; }
.ck { color: var(--c-teal); margin-top: 2px; flex: none; }

/* Sections */
.section-title, .group-title { font-size: clamp(22px, 3.4vw, 30px); letter-spacing: -0.02em; margin: 0 0 22px; text-align: center; text-transform: none; color: var(--text); font-weight: 700; }
.compare, .ai-strip, .faq { margin-top: 72px; }

/* Comparison table: sticky plan names on a wide screen; sections that open on a phone. */
.cmp { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--t-base); }
.cmp thead th { position: sticky; top: 0; z-index: 3; background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(8px); text-align: center; padding: 14px 8px; font-size: var(--t-md); border-bottom: 1px solid var(--border); }
.cmp th[scope="row"] { text-align: left; font-weight: 500; color: var(--text-2); padding: 13px 12px 13px 4px; width: 26%; }
.cmp td { text-align: center; padding: 13px 8px; border-top: 1px solid var(--border); color: var(--text); }
.cmp tr:not(.cmp-section) th[scope="row"] { border-top: 1px solid var(--border); }
.cmp .cmp-section th { text-align: left; padding: 26px 4px 8px; font-size: var(--t-sm); letter-spacing: 0.02em; color: var(--text); font-weight: 700; border: 0; }
.cmp td[data-plan="crew"], .cmp thead th[data-plan="crew"] { background: var(--surface); }
.cmp td[data-plan="crew"] { box-shadow: none; }
.dash { display: inline-block; width: 12px; height: 2px; background: var(--border-strong); border-radius: var(--r-xs); vertical-align: middle; }
.cmp-acc { display: none; }
@media (max-width: 899px) {
  .cmp { display: none; }
  .cmp-acc { display: grid; gap: 10px; }
}
.cmp-acc details { border: 1px solid var(--border); border-radius: var(--r-xl); background: var(--surface); overflow: clip; }
.cmp-acc summary { list-style: none; cursor: pointer; padding: 16px 18px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; min-height: 52px; }
.cmp-acc summary::-webkit-details-marker, .faq summary::-webkit-details-marker { display: none; }
.cmp-acc summary::after, .faq summary::after { content: ""; width: 9px; height: 9px; border: solid var(--text-2); border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform 200ms; margin-right: 4px; flex: none; }
.cmp-acc details[open] summary::after, .faq details[open] summary::after { transform: rotate(-135deg); }
.acc-row { padding: 12px 18px 14px; border-top: 1px solid var(--hairline); }
.acc-label { margin: 0 0 8px; color: var(--text); font-weight: 500; font-size: var(--t-base); }
.acc-row dl { margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px 12px; }
.acc-row dl > div { display: flex; flex-direction: column; gap: 2px; }
.acc-row dt { font-size: var(--t-xs); color: var(--text-3); }
.acc-row dd { margin: 0; font-size: var(--t-md); color: var(--text); display: flex; align-items: center; min-height: 20px; }

/* How AI works here */
.tiles { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 800px) { .tiles { grid-template-columns: repeat(3, 1fr); } }
.tile { padding: 22px 22px 20px; border-radius: var(--r-xl); border: 1px solid var(--border); background: var(--surface); }
.tile h3 { margin: 0 0 8px; font-size: var(--t-xl); line-height: 1.3; letter-spacing: -0.01em; }
.tile p { margin: 0; color: var(--text-2); font-size: var(--t-base); line-height: 1.5; }

/* FAQ */
.faq-list { max-width: 760px; margin: 0 auto; display: grid; gap: 10px; }
.faq details { border: 1px solid var(--border); border-radius: var(--r-xl); background: var(--surface); transition: border-color 160ms; }
.faq details:hover, .faq details[open] { border-color: var(--accent-line); }
.faq summary { list-style: none; cursor: pointer; padding: 18px 20px; font-weight: 600; font-size: var(--t-lg); display: flex; justify-content: space-between; align-items: center; gap: 14px; min-height: 56px; }
.faq details p { margin: 0; padding: 0 20px 20px; color: var(--text-2); font-size: var(--t-base); line-height: 1.6; }

/* Final call to action */
.cta { margin-top: 72px; padding: 52px 24px; text-align: center; border-radius: var(--r-xl); border: 1px solid var(--accent-line);
  background: var(--surface); }
.cta h2 { margin: 0 0 22px; font-size: clamp(26px, 4.5vw, 40px); letter-spacing: -0.03em; }
.cta .pbtn { width: auto; min-width: 200px; }

.foot { max-width: 1160px; margin: 0 auto; padding: 0 20px 48px; }
.note-line { color: var(--text-3); font-size: var(--t-sm); text-align: center; margin: 0; }

@media (max-width: 480px) {
  main { padding-inline: 16px; }
  .topnav { padding-inline: 16px; }
  .hero { padding-top: 24px; }
  .amt { font-size: var(--t-5xl); }
  .plan { padding: 24px 20px 20px; }
  .interval button { padding: 0 12px; font-size: var(--t-md); }
  .save { padding: 4px 7px; }
}

@media (max-width: 879px) { .plan.featured::before { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .plan, .plan:hover, .pbtn, .pbtn:hover, .price-line, .equiv, .navlink, .cmp-acc summary::after, .faq summary::after { transition: none; transform: none; }
}
