/* The /pricing page. Everything here is scoped to .pricing-page and reuses the tokens in styles.css.
   One left rail runs the length of the page: each plan's price and action sit in it, and so does each
   section's heading, so the eye finds "what it costs" and "what this part is about" in the same place. */
.pricing-page { --pp-rail: 300px; --pp-gap: clamp(28px, 4vw, 56px); --pp-width: 1080px; }

/* Foxfire on washi is under 3:1, so focus rings on the light surface use the text vermilion; the night card keeps Foxfire. */
.pricing-page :focus-visible { outline-color: var(--vermilion-ink); }
.pricing-page .plan-plus :focus-visible { outline-color: var(--foxfire); }

.pp-hero,
.pricing-page .plans,
.pp-terms,
.pp-fit,
.pp-faq,
.pp-close,
.pricing-value,
.pricing-compare { max-width: var(--pp-width); margin-left: auto; margin-right: auto; }

.pricing-page.blog-main { padding-top: clamp(28px, 5vw, 60px); }
.pp-title { max-width: 21ch; margin: 0; font-family: var(--font-display); font-size: clamp(2.125rem, 5.2vw, 3.5rem); line-height: 1.05; letter-spacing: -0.03em; text-wrap: balance; }
.pp-dek { max-width: 64ch; margin: 18px 0 0; color: var(--muted); font-size: clamp(1.0625rem, 1.6vw, 1.1875rem); line-height: 1.55; text-wrap: pretty; }

.pp-jump { margin: 16px 0 0; }
.pp-jump a { display: inline-flex; align-items: center; min-height: 44px; color: var(--vermilion-ink); font-weight: 600; text-underline-offset: 3px; }
@media (min-width: 1000px) { .pp-jump { display: none; } }

/* ---------- Plans ---------- */
.pricing-page .plans { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin-top: clamp(32px, 5vw, 52px); }
.pricing-page .plan { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; padding: clamp(22px, 3.4vw, 36px); border-radius: 14px; }
.pricing-page .pp-free { background: var(--card); }
.pricing-page .plan h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0; font-family: var(--font-display); font-size: 1.25rem; letter-spacing: -0.015em; }
.pricing-page .soon { position: static; }
.pricing-page .price { margin-top: 10px; }
.pricing-page .plan-for { max-width: 44ch; }
.pp-offer > .btn { margin-top: 20px; }
.pricing-page .plus-trial-note { margin-top: 16px; color: var(--ink-dark); }
.pp-actions { display: grid; gap: 10px; margin-top: 20px; }
.pricing-page .pp-actions .btn { min-height: 52px; }
.pricing-page .pricing-yearly-cta { margin-top: 0; }
.pp-checkout-error { margin: 2px 0 0; padding: 10px 12px; border-left: 3px solid var(--foxfire); border-radius: 6px; background: rgba(241, 236, 228, 0.08); color: var(--ink-dark); font-size: 0.9375rem; }
.pp-checkout-error:empty { display: none; }
.pricing-page .pp-requires { margin-top: 16px; font-size: 0.875rem; line-height: 1.5; }
.pricing-page .pp-requires a { color: var(--ink-dark); }

.pp-includes-lead { margin: 0 0 14px; font-weight: 650; }
.pp-free .pp-includes-lead { color: var(--sumi); }
.pricing-page .plan ul { flex: none; margin: 0; gap: 10px; }
.pricing-page .plan li { line-height: 1.45; }
.pricing-page .plan li code { font-family: var(--mono); font-size: 0.875em; }
.pp-groups { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.pp-group h3 { margin: 0 0 10px; color: var(--foxfire); font-size: 0.9375rem; font-weight: 650; }

@media (min-width: 620px) {
  .pp-free ul, .pp-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; }
}
/* Wide screens: the free plan takes the rail and Plus takes the body, so both prices and the trial button share the first screen. */
@media (min-width: 1000px) {
  .pricing-page .plans { grid-template-columns: calc(var(--pp-rail) + 2 * clamp(22px, 3.4vw, 36px)) minmax(0, 1fr); align-items: stretch; }
  .pricing-page .plan { align-content: start; }
  .pp-free ul { grid-template-columns: minmax(0, 1fr); }
  .pp-free .pp-includes { padding-top: 24px; border-top: 1px solid var(--line); }
  .plan-plus .pp-offer { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--pp-gap); align-items: start; }
  .plan-plus .pp-offer > * { grid-column: 1; }
  .plan-plus .pp-offer > .pp-actions { grid-column: 2; grid-row: 1 / span 4; align-self: end; margin-top: 0; }
  .plan-plus .pp-offer > .pp-requires { grid-column: 1 / -1; max-width: none; }
  .plan-plus .pp-includes { padding-top: 24px; border-top: 1px solid var(--line-dark); }
}

/* ---------- Sections on the rail ---------- */
.pp-terms, .pp-fit, .pp-faq, .pricing-value, .pricing-compare { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; margin-top: clamp(56px, 8vw, 104px); }
.pp-rail > h2 { margin: 0; font-family: var(--font-display); font-size: clamp(1.625rem, 3vw, 2.125rem); line-height: 1.08; letter-spacing: -0.03em; text-wrap: balance; }
.pp-rail > .eyebrow { margin-bottom: 10px; }
.pricing-value-lede { max-width: 60ch; margin: 14px 0 0; color: var(--muted); line-height: 1.6; text-wrap: pretty; }
.pp-body { min-width: 0; }
@media (min-width: 900px) {
  .pp-terms, .pp-fit, .pp-faq, .pricing-value, .pricing-compare { grid-template-columns: var(--pp-rail) minmax(0, 1fr); gap: var(--pp-gap); padding: 0 clamp(22px, 3.4vw, 36px); }
  .pp-body { padding-left: var(--pp-gap); }
  .pp-rail > h2 { max-width: 16ch; }
}

/* What you agree to */
.pp-terms { margin-top: clamp(40px, 6vw, 64px); }
.pp-terms dl { margin: 0; }
.pp-terms dl > div { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; padding: 14px 0; border-top: 1px solid var(--line); }
.pp-terms dl > div:last-child { border-bottom: 1px solid var(--line); }
.pp-terms dt { font-weight: 650; }
.pp-terms dd { margin: 0; color: var(--muted); line-height: 1.55; }
.pricing-page .pricing-page-fine { max-width: none; margin: 16px 0 0; font-size: 0.9375rem; text-align: left; }
@media (min-width: 620px) {
  .pp-terms dl > div { grid-template-columns: 9.5rem minmax(0, 1fr); gap: 20px; }
}

/* Which one is for you */
.pp-fit-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
.pp-fit-cols h3 { margin: 0 0 12px; font-family: var(--font-display); font-size: 1.1875rem; letter-spacing: -0.015em; }
.pp-fit-cols ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.pp-fit-cols li { padding-top: 10px; border-top: 1px solid var(--line); color: var(--muted); line-height: 1.5; }
@media (min-width: 620px) {
  .pp-fit-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--pp-gap); }
}

/* Comparison table */
.pricing-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.pricing-compare table { width: 100%; border-collapse: collapse; text-align: left; }
.pricing-compare th,
.pricing-compare td { padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
.pricing-compare thead th { background: var(--washi); color: var(--muted); font-size: 0.875rem; font-weight: 650; }
.pricing-compare thead th:last-child { color: var(--vermilion-ink); }
.pricing-compare tbody th { width: 40%; font-weight: 650; }
.pricing-compare tbody td { color: var(--muted); }
.pricing-compare tbody td:last-child { color: var(--sumi); font-weight: 600; }
.pricing-compare tbody tr:last-child th,
.pricing-compare tbody tr:last-child td { border-bottom: 0; }
.pricing-compare-note { max-width: 70ch; margin: 16px 0 0; color: var(--muted); font-size: 0.9375rem; line-height: 1.6; }

/* What Plus adds, one row each */
.pp-rows article { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 20px 0; border-top: 1px solid var(--line); }
.pp-rows article:last-child { border-bottom: 1px solid var(--line); }
.pricing-value-number { margin: 0; color: var(--vermilion-ink); font-size: 0.9375rem; font-weight: 650; }
.pp-rows h3 { margin: 0; font-family: var(--font-display); font-size: 1.1875rem; line-height: 1.2; letter-spacing: -0.015em; }
.pp-rows article div > p { margin: 8px 0 0; color: var(--muted); line-height: 1.6; }
.pp-rows code { font-family: var(--mono); font-size: 0.875em; }
@media (min-width: 620px) {
  .pp-rows article { grid-template-columns: 9.5rem minmax(0, 1fr); gap: 20px; }
  .pp-rows .pricing-value-number { padding-top: 3px; }
}

/* Activation: a real sequence, so it is numbered */
.pp-steps { margin: 0; padding: 0; list-style: none; counter-reset: pp-step; }
.pp-steps li { counter-increment: pp-step; position: relative; padding: 18px 0 18px 52px; border-top: 1px solid var(--line); }
.pp-steps li::before { content: counter(pp-step); position: absolute; left: 0; top: 14px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--sumi); color: var(--card); font-family: var(--font-display); font-weight: 650; font-variant-numeric: tabular-nums; }
.pp-steps h3 { margin: 0; font-family: var(--font-display); font-size: 1.1875rem; line-height: 1.2; letter-spacing: -0.015em; }
.pp-steps p { margin: 8px 0 0; color: var(--muted); line-height: 1.6; }
.pp-steps-after { margin: 0; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted); line-height: 1.6; }
.pp-steps-after strong { color: var(--sumi); }

/* Questions: the site's native-details pattern from styles.css */
.pp-faq .qa summary { min-height: 48px; padding: 18px 4px; }
.pp-faq .qa-body { padding-right: clamp(4px, 6vw, 54px); line-height: 1.6; }
.pp-faq .qa-body a { text-underline-offset: 2px; }

/* Subscribers who came here to manage Plus (the account link main added to this page). */
.pricing-page .pp-account { max-width: var(--pp-width); margin: clamp(32px, 5vw, 48px) auto 0; text-align: center; }
.pricing-page .pp-account a { display: inline-flex; align-items: center; min-height: 24px; color: var(--vermilion-ink); font-weight: 600; text-underline-offset: 3px; }

.pp-close { margin-top: clamp(48px, 7vw, 80px); color: var(--muted); text-align: center; text-wrap: balance; }
.pp-close a { color: var(--vermilion-ink); font-weight: 600; text-underline-offset: 2px; white-space: nowrap; }

/* Phones: three columns do not fit, so each feature takes its own line and its Free and Plus values sit side by
   side beneath it, under the two plan names. Nothing scrolls sideways. The roles on the table in pricing.html keep
   it a table for assistive technology once its rows are no longer laid out as table rows. */
@media (max-width: 600px) {
  .pricing-compare table,
  .pricing-compare thead,
  .pricing-compare tbody { display: block; }
  .pricing-compare tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pricing-compare th,
  .pricing-compare td { padding: 12px 16px; overflow-wrap: break-word; }
  .pricing-compare thead th:first-child { position: absolute; width: 1px; height: 1px; padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .pricing-compare tbody th { grid-column: 1 / -1; width: auto; padding-bottom: 0; border-bottom: 0; }
  .pricing-compare tbody td { padding-top: 4px; }
}

/* Plus runs only in the Mac app until Windows Plus qualifies (docs/plus-windows-qualification.md).
   navigation.js sets data-system; without it the Mac-only line above the checkout still applies. */
.plus-windows-notice { display: none; }
html[data-system="windows"] .plus-windows-notice { display: block; margin: 16px 0 0; padding: 10px 12px; border-left: 3px solid var(--foxfire); border-radius: 6px; background: rgba(241, 236, 228, 0.08); color: var(--ink-dark); font-size: 0.9375rem; }
/* Windows visitors cannot activate Plus yet, so the free download leads and the trial buttons step back. */
html[data-system="windows"] .pp-free [data-primary-download] { background: var(--vermilion); color: #fff; }
html[data-system="windows"] .pp-free [data-primary-download]:hover { background: var(--vermilion-hover); }
html[data-system="windows"] .plan-plus .pp-actions .btn-primary { background: rgba(241, 236, 228, 0.1); color: var(--ink-dark); }
html[data-system="windows"] .plan-plus .pp-actions .btn-primary:hover { background: rgba(241, 236, 228, 0.16); }

@media (prefers-contrast: more) {
  .pp-terms dd, .pp-fit-cols li, .pp-rows article div > p, .pp-steps p, .pp-steps-after, .pricing-compare tbody td, .pp-dek, .pricing-value-lede, .pp-close { color: inherit; }
}
@media (prefers-reduced-motion: reduce) {
  html:has(.pricing-page) { scroll-behavior: auto; }
}
@media (forced-colors: active) {
  .pp-steps li::before { border: 1px solid CanvasText; }
}
