/*
 * css/pages.css - styles for the plain information pages (pricing, terms, privacy, refund) and the
 * owner's counters page (decisions D38, Clinic Teal skin in docs/DESIGN.md).
 *
 * Purpose:    One readable column on a phone, the same Clinic Teal colours as the app in day and night, with the
 *             footer every page needs ("Kartak is run by Ghulam Mustafa" and the independence line).
 *             No colours are written here: every colour is a token from css/tokens.css (which also styles the
 *             theme button, .theme-btn).
 * Used by:    pricing.html, terms.html, privacy.html, privacy-ar.html, privacy-ur.html, refund.html, admin.html,
 *             and blog/** (with css/blog.css on top).
 * Depends on: css/tokens.css (colours, --muted, .theme-btn), css/fonts.css (Noto fonts).
 */
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 "Noto Sans", system-ui, -apple-system, "Segoe UI", sans-serif; }
main, header, footer { max-width: 680px; margin: 0 auto; padding: 0 18px; }
header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 12px; padding-bottom: 8px; }
header a { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 20px; min-height: 44px; }
header svg { width: 28px; height: 28px; flex: none; }
header .theme-btn svg { width: 22px; height: 22px; }
h1 { font-size: 24px; font-weight: 800; line-height: 1.25; margin: 8px 0 6px; }
h2 { font-size: 18px; font-weight: 700; line-height: 1.35; margin: 26px 0 6px; }
p, li { max-width: 38em; }
.lead { color: var(--muted); }
.card { background: var(--surface); border-radius: 20px; padding: 18px; margin: 18px 0; }
.card p { margin: 4px 0 8px; }
.card p:first-child { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }
.card ul { margin: 8px 0; }
.price {font-size: 40px; font-weight: 800; line-height: 1.1; }
.price .sar { font-size: 17px; font-weight: 600; color: var(--ink-soft); }
.sarnote { color: var(--muted); font-size: 15px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: 14px; background: var(--primary); color: var(--on-primary); font-weight: 700; text-decoration: none; border: 0; font-size: 16px; font-family: inherit; cursor: pointer; -webkit-user-select: none; user-select: none; }
.btn.wa { background: var(--whatsapp); color: var(--on-whatsapp); }
.btn.secondary { background: var(--surface); color: var(--ink-soft); }
a { color: var(--ink-soft); }
a:focus-visible, .btn:focus-visible, input:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.todo { background: var(--accent-bg); color: var(--accent-ink); border-radius: 8px; padding: 2px 6px; }
footer { color: var(--muted); font-size: 14px; border-top: 1px solid var(--border); margin-top: 36px; padding-top: 14px; padding-bottom: 40px; }
footer p { margin: 0 0 6px; }
footer nav { display: flex; flex-wrap: wrap; column-gap: 18px; }
footer nav a { display: inline-block; min-height: 44px; line-height: 44px; font-weight: 700; }
table { width: 100%; border-collapse: collapse; background: var(--surface-2); border-radius: 14px; overflow: hidden; font-variant-numeric: tabular-nums; }
th { background: var(--surface); font-weight: 700; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: end; }
tr:last-child > td, tr:last-child > th { border-bottom: 0; }
th:first-child, td:first-child { text-align: start; }
table.plain th, table.plain td { text-align: start; vertical-align: top; font-size: 15px; }
/* wide tables scroll inside their own rounded box instead of squeezing into one-word lines */
div:has(> table) { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 14px; }
table.plain th, table.plain td { min-width: 10em; }
html[lang="ur"] table.plain th, html[lang="ur"] table.plain td { min-width: 12em; }
input { min-height: 48px; font-size: 16px; font-family: inherit; padding: 0 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-2); color: var(--ink); width: 100%; max-width: 320px; }
/* Urdu: Nastaliq lines are tall, so headings, cells and buttons get a tall line height and padding or they clip */
html[lang="ur"] h1, html[lang="ur"] h2 { line-height: 1.9; }
html[lang="ur"] h1 { margin: 4px 0 2px; }
html[lang="ur"] th, html[lang="ur"] td { line-height: 2; padding-block: 12px; }
html[lang="ur"] .btn { line-height: 2; padding-block: 8px; }
html[lang="ur"] footer, html[lang="ur"] header a { line-height: 2; }
@media (hover: hover) {
  .btn:hover { opacity: .9; }
  a:hover { text-decoration-thickness: 2px; }
}
