/* =============================================================================
   BillGrid public site: the inner pages (pricing, features, about, contact, help, privacy,
   terms, blog, newsletter). Loads after outer/site.css and reuses its tokens and components.
   Design source: docs/mocks/site/payday.html.
   ============================================================================= */

/* ---------- page head: kicker, headline, lead ---------- */
.page-head { padding-block: clamp(56px, 7vw, 96px) clamp(36px, 4vw, 56px); }
.page-head h1 { margin-top: 12px; font-size: clamp(40px, 5vw, 68px); line-height: 1; letter-spacing: -.035em; }
.page-head .lead { max-width: 36em; margin-top: 18px; }
.page-head--center { text-align: center; }
.page-head--center .lead { margin-inline: auto; }
.page-head__meta { margin-top: 14px; font-size: var(--fs-sm); color: var(--caption); }
/* a blog post's title is a sentence, not a slogan: smaller, with a comfortable measure */
.page-head--post h1 { max-width: 18em; margin-top: 16px; font-size: clamp(34px, 4vw, 52px); line-height: 1.08; }
.page-body { padding-bottom: clamp(72px, 9vw, 120px); }
.page-body > .section:last-child { padding-bottom: 0; }

.back-link { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-sm); color: var(--text-muted); text-decoration: none; }
.back-link:hover { color: var(--ink); }

/* ---------- prose: legal pages and blog posts ---------- */
.prose { max-width: 680px; font-size: var(--fs-md); line-height: 1.7; color: var(--text); }
.prose > * + * { margin-top: 18px; }
.prose > :first-child { margin-top: 0; }
.prose h2 { margin-top: 52px; font-size: var(--fs-xl); line-height: 1.2; letter-spacing: -.02em; }
.prose h3 { margin-top: 32px; font-size: var(--fs-md); letter-spacing: -.01em; }
.prose h2 + *, .prose h3 + * { margin-top: 12px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li + li { margin-top: 6px; }
.prose li::marker { color: var(--caption); }
.prose a { color: var(--ink); text-decoration-color: var(--gold); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose a:hover { text-decoration-thickness: 2px; }
.prose strong { font-weight: 600; color: var(--ink); }
.prose .lede { font-size: var(--fs-lead); color: var(--text-muted); }
.prose blockquote { margin-inline: 0; padding-left: 20px; border-left: 2px solid var(--gold); color: var(--text-muted); }
.prose figure { margin-inline: 0; }
.prose figcaption { margin-top: 8px; font-size: var(--fs-sm); color: var(--caption); }

/* a before/after speed chart in a post: two totals, then bars to scale (--v is the bar's share of the longest) */
.speed-chart { padding: 26px 26px 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); }
.speed-chart__totals { display: flex; gap: 40px; }
.speed-chart__totals span { display: block; font-size: var(--fs-xs); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--caption); }
.speed-chart__totals b { font-family: Georgia, 'Times New Roman', serif; font-size: 44px; font-weight: 600; line-height: 1.15; color: var(--text-soft); }
.speed-chart__totals .is-new b { color: var(--gold-deep); }
.prose .speed-chart__note { margin: 6px 0 22px; font-size: var(--fs-sm); color: var(--text-muted); }
.prose .speed-chart__bars { margin: 0; padding: 0; list-style: none; }
.prose .speed-chart__bars li + li { margin-top: 14px; }
.speed-chart__task { display: block; margin-bottom: 4px; font-size: var(--fs-sm); font-weight: 600; color: var(--ink); }
.speed-chart__bar { display: flex; align-items: center; gap: 8px; height: 14px; margin-top: 3px; }
.speed-chart__bar::before { content: ""; flex: none; width: var(--v); min-width: 4px; max-width: calc(100% - 64px); height: 100%; border-radius: 4px; background: #d8cfbb; }
.speed-chart__bar.is-new::before { background: var(--gold); }
.speed-chart__bar em { font-size: var(--fs-xs); font-style: normal; font-variant-numeric: tabular-nums; color: var(--text-muted); white-space: nowrap; }
.speed-chart__bar.is-new em { font-weight: 600; color: var(--gold-deep); }
@media (max-width: 560px) { .speed-chart { padding: 20px 18px 16px; } .speed-chart__totals b { font-size: 36px; } }

/* a highlighted aside inside prose: blog calls to action, legal summaries */
.callout { padding: 22px 24px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); font-size: var(--fs-body); }
.prose > .callout { margin-top: 44px; }

/* ---------- feature grid (features, pricing) ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(28px, 3vw, 44px) clamp(24px, 3vw, 56px); margin: 0; padding: 0; list-style: none; }
.feature-grid__icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--gold-soft); color: var(--gold-deep); }
.feature-grid h3 { margin-top: 14px; font-size: var(--fs-md); letter-spacing: -.01em; line-height: 1.3; }
.feature-grid p { margin-top: 6px; color: var(--text-muted); }
.feature-grid__tag { margin-left: 6px; padding: 2px 7px; border-radius: var(--r-pill); background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0; color: var(--caption); vertical-align: 2px; }
@media (max-width: 900px) { .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .feature-grid { grid-template-columns: minmax(0, 1fr); } }

.section__head + .feature-grid { margin-top: 44px; }
.section__head + .faq { margin-top: 36px; }

/* a titled group of features (features page) */
.feature-group + .feature-group { margin-top: clamp(64px, 8vw, 104px); }
.feature-group__head { max-width: 680px; margin-bottom: 36px; }
.feature-group__head h2 { margin-top: 10px; font-size: clamp(28px, 3vw, 40px); line-height: 1.05; }
.feature-group__head p { margin-top: 12px; color: var(--text-muted); }

/* ---------- FAQ: native <details>, so it works without JavaScript ---------- */
.faq { max-width: 780px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; padding: 20px 0; list-style: none; cursor: pointer; font-size: var(--fs-md); font-weight: 600; letter-spacing: -.01em; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; font-size: var(--fs-lg); font-weight: 400; line-height: 1; color: var(--caption); transition: rotate .2s var(--ease-out); }
.faq details[open] summary::after { rotate: 45deg; }
.faq summary:hover::after { color: var(--ink); }
.faq__answer { max-width: 64ch; padding-bottom: 22px; color: var(--text-muted); }
.faq__answer > * + * { margin-top: 10px; }
.faq__answer a { color: var(--ink); text-decoration-color: var(--gold); text-underline-offset: 3px; }
.faq-group + .faq-group { margin-top: 56px; }
.faq__more { margin-top: 24px; font-size: var(--fs-sm); color: var(--caption); }
.faq__more a { color: var(--ink); text-underline-offset: 3px; }
.faq-group > h2 { margin-bottom: 8px; font-size: var(--fs-xl); letter-spacing: -.02em; }

/* ---------- two columns: copy beside a form or a list ---------- */
.split { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: minmax(0, 1fr); } }

/* help: the questions beside a sticky "still stuck?" panel */
.help-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: clamp(32px, 5vw, 80px); align-items: start; }
.help-layout__aside { position: sticky; top: 96px; }
.help-layout__aside h2 { font-size: var(--fs-lg); letter-spacing: -.02em; }
.help-layout__aside > p { margin-top: 6px; color: var(--text-muted); }
.points b + a, .points b + span { display: block; }
@media (max-width: 900px) { .help-layout { grid-template-columns: minmax(0, 1fr); } .help-layout__aside { position: static; } }

.panel { padding: clamp(22px, 3vw, 36px); border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: var(--shadow-card); }
.form-stack { display: grid; gap: 16px; }
.form-stack .btn { justify-self: start; }
.form-stack .alert { margin-top: 0; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field__optional { font-weight: 400; color: var(--caption); }
@media (max-width: 560px) { .form-row { grid-template-columns: minmax(0, 1fr); } }

/* contact: the page head sits in the left column, beside the form */
.contact { padding-top: clamp(56px, 7vw, 96px); }
.contact .page-head { padding: 0; }
.contact__panel { margin-top: 8px; }

/* ways to reach us / quick links: an icon tile beside a title and a line */
.points { display: grid; gap: 22px; margin: 32px 0 0; padding: 0; list-style: none; }
.points li { display: flex; gap: 14px; align-items: flex-start; }
.points__icon { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--trust-bg); color: var(--trust); }
.points b { display: block; font-weight: 600; color: var(--ink); }
.points span, .points a { color: var(--text-muted); }
.points a { text-decoration-color: var(--line); text-underline-offset: 3px; }
.points a:hover { color: var(--ink); text-decoration-color: currentColor; }

/* ---------- blog ---------- */
.post-list { max-width: 780px; border-top: 1px solid var(--line); }
.post-card { display: block; padding: 30px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.post-card h2 { font-size: var(--fs-xl); line-height: 1.25; letter-spacing: -.02em; transition: color .15s; }
.post-card:hover h2 { color: var(--gold-deep); }
.post-card p { margin-top: 8px; color: var(--text-muted); }
.post-card__meta { font-size: var(--fs-sm); color: var(--caption); }
.post-card__more { display: inline-flex; align-items: center; gap: 4px; margin-top: 12px; font-weight: 600; color: var(--ink); }
.post-card:hover .post-card__more .bg-icon { translate: 3px 0; }
.post-card__more .bg-icon { transition: translate .2s var(--ease-out); }

/* ---------- a single centred message: the newsletter states ---------- */
.notice { max-width: 580px; margin-inline: auto; padding-block: clamp(64px, 9vw, 128px); text-align: center; }
.notice__icon { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 22px; border-radius: 16px; background: var(--gold-soft); color: var(--gold-deep); }
.notice__icon--ok { background: var(--paid-bg); color: var(--paid-fg); }
.notice__icon--warn { background: var(--overdue-bg); color: var(--overdue-fg); }
.notice h1 { font-size: clamp(32px, 4vw, 48px); line-height: 1.05; }
.notice .lead { margin-top: 14px; }
.notice .newsletter-form, .notice form:not(.newsletter-form) > .btn { margin: 28px auto 0; }
.notice__list { display: grid; gap: 8px; max-width: 440px; margin: 28px auto 0; padding: 18px 22px; border-radius: 14px; background: var(--paper); list-style: none; text-align: left; font-size: var(--fs-sm); color: var(--text-muted); }
.notice__list li { display: flex; gap: 10px; }
.notice__list li::before { content: "\2022"; color: var(--gold); }
.notice__fine { margin-top: 20px; font-size: var(--fs-sm); color: var(--caption); }
.notice__fine a, .notice .lead a { color: var(--ink); text-underline-offset: 3px; }
.notice__posts { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--line); text-align: left; }
.notice__posts h2 { font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-deep); }
.notice__posts a { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.notice__posts a:hover { color: var(--gold-deep); }
.notice__posts small { flex: none; font-size: var(--fs-sm); color: var(--caption); }
