/* Shared styles for the non-quiz content pages (about, contact, privacy, ksa,
   formulas, faq). Loaded alongside css/quiz.css, which supplies the design
   tokens and the #sidebar/#topbar/#content shell. Every class here matches
   exactly what each page's existing HTML already uses - no markup changes,
   just a flat restyle onto the same token system as the quiz pages. */

/* ── Legacy layout ids some of these pages still use ─────────────────────── */
#refArea { width: 260px; flex-shrink: 0; display: flex; flex-direction: column; gap: var(--sp-3); position: sticky; top: var(--sp-5); }
.content-inner { width: 100%; max-width: 680px; display: flex; flex-direction: column; gap: var(--sp-4); }

/* ── HOMEPAGE (index.html) ────────────────────────────────────────────────── */
.page-section { padding: var(--sp-6); }
.page-section + .page-section { border-top: 1px solid var(--line); }
.page-section h1 { font-family: var(--font-ui); font-weight: 700; font-size: var(--fs-600); color: var(--ink-900); margin-bottom: 4px; }
.page-section-desc { font-size: var(--fs-300); color: var(--ink-500); margin-bottom: var(--sp-4); max-width: 560px; }
.page-section h2 { font-family: var(--font-ui); font-weight: 600; font-size: var(--fs-500); color: var(--ink-900); margin-bottom: var(--sp-1); }

.subject-card { background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: var(--sp-3) var(--sp-4); text-decoration: none; display: flex; flex-direction: column; gap: 4px; }
.subject-card:hover { border-color: var(--accent); background: var(--surface-0); }
.subject-card-code { display: inline-flex; align-items: center; width: fit-content; font-family: var(--font-mono); font-size: var(--fs-100); font-weight: 600; color: var(--accent-700); background: var(--accent-100); padding: 1px 6px; border-radius: var(--radius-sm); }
.subject-card-name { font-size: var(--fs-300); font-weight: 600; color: var(--ink-900); line-height: 1.3; }
.subject-card-tag { font-size: var(--fs-100); color: var(--ink-500); }

.steps-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-4); }
.step-item { display: flex; flex-direction: column; gap: var(--sp-2); }
.step-num { width: 24px; height: 24px; background: var(--chrome-900); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: var(--fs-200); font-weight: 600; flex-shrink: 0; }
.step-title { font-size: var(--fs-300); font-weight: 600; color: var(--ink-900); }
.step-desc { font-size: var(--fs-200); color: var(--ink-500); line-height: 1.6; }

.tip-block { background: var(--accent-tint); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: var(--sp-3) var(--sp-4); font-size: var(--fs-300); color: var(--ink-700); line-height: 1.6; }
.tip-block strong { color: var(--ink-900); }
.tip-block a { color: var(--accent); text-decoration: none; }

.seo-section h2 { font-family: var(--font-ui); font-weight: 600; font-size: var(--fs-500); color: var(--ink-900); margin-bottom: var(--sp-3); }
.seo-section h3 { font-size: var(--fs-400); font-weight: 600; color: var(--ink-900); margin: var(--sp-4) 0 var(--sp-2); }
.seo-section p { font-size: var(--fs-300); color: var(--ink-500); line-height: 1.7; margin-bottom: var(--sp-2); }
.seo-section p:last-child { margin-bottom: 0; }
.seo-section a { color: var(--accent); }

.footer-note { padding: var(--sp-4) var(--sp-6); font-size: var(--fs-200); color: var(--ink-500); text-align: center; }

.start-panel { background: var(--chrome-900); border-radius: var(--radius); padding: var(--sp-4); }
.start-panel-title { font-size: var(--fs-400); font-weight: 600; color: white; margin-bottom: var(--sp-2); }
.start-panel p { font-size: var(--fs-200); color: rgba(255,255,255,0.65); line-height: 1.6; }
.start-panel a { color: #9fd1f5; font-size: var(--fs-200); text-decoration: none; display: block; margin-top: var(--sp-1); }
.start-panel a:hover { text-decoration: underline; }

/* ── PAGE HERO (about/contact/privacy/ksa/formulas) ──────────────────────── */
.page-hero { background: var(--surface-0); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--sp-6); }
.hero-breadcrumb { display: flex; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-3); font-size: var(--fs-200); color: var(--ink-500); }
.hero-breadcrumb a { color: var(--accent); text-decoration: none; }
.hero-breadcrumb a:hover { text-decoration: underline; }
.hero-eyebrow { display: none; } /* decorative pill badge - dropped */
.page-hero h1 { font-family: var(--font-ui); font-weight: 700; font-size: var(--fs-600); color: var(--ink-900); margin-bottom: var(--sp-2); }
.page-hero h1 em { font-style: normal; color: var(--accent); }
.page-hero p { font-size: var(--fs-300); color: var(--ink-500); max-width: 560px; line-height: 1.6; }
.hero-stats { display: flex; gap: var(--sp-5); flex-wrap: wrap; padding-top: var(--sp-3); font-family: var(--font-mono); }
.hero-stat { display: flex; flex-direction: column; gap: 2px; }
.hero-stat-num { font-size: var(--fs-500); font-weight: 700; color: var(--ink-900); }
.hero-stat-lbl { font-size: var(--fs-100); color: var(--ink-500); text-transform: uppercase; letter-spacing: 0.5px; }

/* ── STAT ROW (about.html) ────────────────────────────────────────────────── */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-3); }
.stat-card { background: var(--surface-0); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--sp-4); text-align: center; }
.stat-num { font-family: var(--font-mono); font-weight: 700; font-size: var(--fs-600); color: var(--ink-900); line-height: 1; margin-bottom: var(--sp-1); }
.stat-lbl { font-size: var(--fs-100); color: var(--ink-500); font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; }

/* ── CONTENT CARDS (about.html, ksa.html) ─────────────────────────────────── */
.content-card { background: var(--surface-0); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; flex-shrink: 0; }
.card-header { padding: var(--sp-4) var(--sp-5); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: var(--sp-3); }
.card-icon { display: none; }
.card-header h2 { font-family: var(--font-ui); font-weight: 600; font-size: var(--fs-500); color: var(--ink-900); }
.card-body { padding: var(--sp-5); font-size: var(--fs-300); color: var(--ink-700); line-height: 1.7; }
.card-body p { margin-bottom: var(--sp-3); }
.card-body p:last-child { margin-bottom: 0; }
.card-body strong { color: var(--ink-900); }
.card-body a { color: var(--accent); text-decoration: none; }
.card-body a:hover { text-decoration: underline; }

/* ── SUBJECT GRID (about.html) ────────────────────────────────────────────── */
.subject-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: var(--sp-2); margin-top: var(--sp-1); }
.subject-pill { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-2) var(--sp-3); background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: var(--fs-300); color: var(--ink-700); text-decoration: none; }
.subject-pill:hover { border-color: var(--accent); color: var(--accent); }
.subject-pill::before { content: none; }

/* ── VALUES ROW (about.html) ──────────────────────────────────────────────── */
.values-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-3); margin-top: var(--sp-1); }
.value-card { background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: var(--sp-4); }
.value-card h3 { font-size: var(--fs-300); font-weight: 700; color: var(--ink-900); margin-bottom: var(--sp-1); }
.value-card p { font-size: var(--fs-200); color: var(--ink-500); line-height: 1.6; }

/* ── CONTACT ROW (about.html) ─────────────────────────────────────────────── */
.contact-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); margin-top: var(--sp-1); }
.contact-item { background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: var(--sp-4); }
.contact-label { font-size: var(--fs-100); font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--accent); margin-bottom: var(--sp-1); }
.contact-item p { font-size: var(--fs-300); color: var(--ink-500); line-height: 1.6; }
.contact-item a { color: var(--accent); text-decoration: none; }
.contact-item a:hover { text-decoration: underline; }

/* ── QUICK LINKS (about.html) ─────────────────────────────────────────────── */
.quick-links { background: var(--surface-0); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--sp-4); }
.quick-links h3 { font-size: var(--fs-300); font-weight: 600; color: var(--ink-900); margin-bottom: var(--sp-3); padding-bottom: var(--sp-2); border-bottom: 1px solid var(--line); }
.ql-link { display: flex; align-items: center; gap: var(--sp-2); padding: 6px var(--sp-2); border-radius: var(--radius-sm); font-size: var(--fs-300); color: var(--ink-500); text-decoration: none; }
.ql-link:hover { background: var(--surface-1); color: var(--accent); }
.ql-link::before { content: none; }

/* ── EMAIL CARD (contact.html) ────────────────────────────────────────────── */
.email-card { background: var(--surface-0); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--sp-7); text-align: center; }
.email-icon { display: none; }
.email-card h2 { font-family: var(--font-ui); font-weight: 600; font-size: var(--fs-500); color: var(--ink-900); margin-bottom: var(--sp-2); }
.email-card p { font-size: var(--fs-300); color: var(--ink-500); margin-bottom: var(--sp-4); line-height: 1.6; }
.email-btn { display: inline-flex; align-items: center; gap: var(--sp-2); background: var(--accent); color: white; text-decoration: none; padding: 10px var(--sp-5); border-radius: var(--radius-sm); font-size: var(--fs-300); font-weight: 600; }
.email-btn:hover { background: var(--accent-600); }
.email-address { display: block; margin-top: var(--sp-3); font-size: var(--fs-200); color: var(--ink-500); }
.email-address a { color: var(--accent); text-decoration: none; }
.email-address a:hover { text-decoration: underline; }

/* ── REASON LIST (contact.html) ───────────────────────────────────────────── */
.reasons { display: flex; flex-direction: column; background: var(--surface-0); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; flex-shrink: 0; }
.reason-item { display: flex; align-items: flex-start; gap: var(--sp-3); padding: var(--sp-4) var(--sp-5); border-bottom: 1px solid var(--surface-1); }
.reason-item:last-child { border-bottom: none; }
.reason-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex-shrink: 0; margin-top: 7px; }
.reason-title { font-size: var(--fs-300); font-weight: 600; color: var(--ink-900); margin-bottom: 2px; }
.reason-desc { font-size: var(--fs-200); color: var(--ink-500); line-height: 1.6; }

.note { background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--sp-4); display: flex; align-items: center; gap: var(--sp-3); }
.note-icon { display: none; }
.note p { font-size: var(--fs-200); color: var(--ink-500); line-height: 1.6; }
.note strong { color: var(--ink-900); }

/* ── PRIVACY SECTIONS (privacy.html) ──────────────────────────────────────── */
.privacy-body { display: flex; flex-direction: column; gap: var(--sp-2); }
.privacy-section { background: var(--surface-0); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--sp-5); }
.privacy-section h2 { font-family: var(--font-ui); font-weight: 600; font-size: var(--fs-400); color: var(--ink-900); margin-bottom: var(--sp-3); padding-bottom: var(--sp-2); border-bottom: 1px solid var(--line); }
.privacy-section p { font-size: var(--fs-300); color: var(--ink-500); line-height: 1.7; margin-bottom: var(--sp-2); }
.privacy-section p:last-child { margin-bottom: 0; }
.privacy-section a { color: var(--accent); text-decoration: none; }
.privacy-section a:hover { text-decoration: underline; }
.privacy-section ul { margin: var(--sp-2) 0; padding-left: var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-1); }
.privacy-section li { font-size: var(--fs-300); color: var(--ink-500); line-height: 1.6; }
.updated-note { font-size: var(--fs-100); color: var(--ink-500); text-align: center; padding: var(--sp-4); }

/* ── IN-PROGRESS BANNER (ksa.html) ────────────────────────────────────────── */
.banner { background: var(--flag-tint); border: 1px solid var(--line); border-left: 3px solid var(--flag); border-radius: var(--radius); padding: var(--sp-4) var(--sp-5); display: flex; align-items: flex-start; gap: var(--sp-3); }
.banner-icon { display: none; }
.banner-title { font-size: var(--fs-300); font-weight: 700; color: var(--ink-900); margin-bottom: var(--sp-1); }
.banner p { font-size: var(--fs-300); color: var(--ink-700); line-height: 1.6; }

/* ── THREE PILLARS (ksa.html) ─────────────────────────────────────────────── */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-3); margin: var(--sp-4) 0 var(--sp-1); }
.pillar { background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: var(--sp-4); }
.pillar-label { font-size: var(--fs-100); font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--accent); margin-bottom: var(--sp-1); }
.pillar h3 { font-size: var(--fs-400); font-weight: 700; color: var(--ink-900); margin-bottom: var(--sp-1); }
.pillar p { font-size: var(--fs-200); color: var(--ink-500); line-height: 1.6; }

/* ── COMPETENCIES / GENERIC DATA TABLE (ksa.html) ─────────────────────────── */
.comp-table { width: 100%; border-collapse: collapse; margin-top: var(--sp-4); font-size: var(--fs-300); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); flex-shrink: 0; }
.comp-table th { background: var(--surface-1); color: var(--ink-900); padding: var(--sp-2) var(--sp-4); text-align: left; font-size: var(--fs-100); font-weight: 600; letter-spacing: 0.4px; text-transform: uppercase; }
.comp-table td { padding: var(--sp-2) var(--sp-4); border-bottom: 1px solid var(--surface-1); color: var(--ink-700); }
.comp-table tr:last-child td { border-bottom: none; }
.comp-table td strong { color: var(--ink-900); }

/* ── FAQ ACCORDION - ksa.html variant (.faq-q / .faq-a) ──────────────────── */
.faq-item { border-bottom: 1px solid var(--surface-1); }
.faq-item:last-child { border-bottom: none; }
.faq-q { padding: var(--sp-3) var(--sp-5); font-size: var(--fs-300); font-weight: 600; color: var(--ink-900); cursor: pointer; display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-3); }
.faq-q:hover { background: var(--surface-1); }
.faq-chevron { color: var(--accent); font-size: var(--fs-400); flex-shrink: 0; transition: transform var(--transition); }
.faq-item.open .faq-chevron { transform: rotate(180deg); }
.faq-a { display: none; padding: 0 var(--sp-5) var(--sp-4); font-size: var(--fs-300); color: var(--ink-500); line-height: 1.7; }
.faq-item.open .faq-a { display: block; }

/* ── FAQ ACCORDION - faq.html variant (.faq-card / .faq-question-row) ────── */
.faq-card { background: var(--surface-0); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; flex-shrink: 0; }
.faq-card-header { padding: var(--sp-4) var(--sp-5); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: var(--sp-3); }
.faq-card-header h2 { font-family: var(--font-ui); font-weight: 600; font-size: var(--fs-500); color: var(--ink-900); }
.faq-body { padding: 2px 0; }
.faq-question-row { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-4); padding: var(--sp-3) var(--sp-5); cursor: pointer; }
.faq-question-row:hover { background: var(--surface-1); }
.faq-question-text { font-size: var(--fs-300); font-weight: 600; color: var(--ink-900); line-height: 1.45; }
.faq-answer { display: none; padding: 0 var(--sp-5) var(--sp-4); font-size: var(--fs-300); color: var(--ink-500); line-height: 1.7; }
.faq-item.open .faq-answer { display: block; }
.faq-answer p { margin-bottom: var(--sp-2); }
.faq-answer p:last-child { margin-bottom: 0; }
.faq-answer strong { color: var(--ink-900); }
.faq-answer a { color: var(--accent); text-decoration: none; }
.faq-answer a:hover { text-decoration: underline; }

/* ── ARTICLES CTA (faq.html) ──────────────────────────────────────────────── */
.articles-cta { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; padding-top: var(--sp-1); }
.btn-articles { display: inline-flex; align-items: center; gap: var(--sp-3); background: var(--chrome-900); color: white; border: none; padding: var(--sp-3) var(--sp-5); border-radius: var(--radius-sm); font-size: var(--fs-300); font-weight: 600; text-decoration: none; }
.btn-articles:hover { background: var(--chrome-900-hover); }
.btn-articles-sub { font-size: var(--fs-100); color: rgba(255,255,255,0.65); font-weight: 400; display: block; margin-top: 1px; }
.btn-articles-inner { display: flex; flex-direction: column; }
.articles-cta-note { font-size: var(--fs-200); color: var(--ink-500); }

/* ── SUBJECTS PANEL (right rail, several pages) ───────────────────────────── */
.subjects-panel { background: var(--surface-0); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--sp-4); }
.subjects-panel h3 { font-size: var(--fs-300); font-weight: 600; color: var(--ink-900); margin-bottom: var(--sp-3); padding-bottom: var(--sp-2); border-bottom: 1px solid var(--line); }
.subject-links { display: flex; flex-direction: column; gap: 2px; }
.subject-link { display: flex; align-items: center; gap: var(--sp-2); padding: 6px var(--sp-2); border-radius: var(--radius-sm); font-size: var(--fs-300); color: var(--ink-500); text-decoration: none; }
.subject-link:hover { background: var(--surface-1); color: var(--accent); }
.subject-link::before { content: none; }

/* ── TABLE OF CONTENTS (formulas.html) ────────────────────────────────────── */
.toc-card { background: var(--surface-0); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; flex-shrink: 0; }
.toc-card-header { padding: var(--sp-3) var(--sp-5); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: var(--sp-2); }
.toc-card-header h2 { font-size: var(--fs-400); font-weight: 600; color: var(--ink-900); }
.toc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.toc-item { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-2) var(--sp-4); border-bottom: 1px solid var(--surface-1); border-right: 1px solid var(--surface-1); text-decoration: none; color: var(--ink-700); font-size: var(--fs-300); }
.toc-item:hover { background: var(--surface-1); color: var(--accent); }
.toc-item::before { content: none; }

/* ── SUBJECT SECTION / FORMULA CARDS (formulas.html) ──────────────────────── */
.subject-section { background: var(--surface-0); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; flex-shrink: 0; }
.section-header { background: var(--chrome-900); padding: var(--sp-4) var(--sp-5); display: flex; align-items: center; gap: var(--sp-3); }
.section-header-text h2 { font-family: var(--font-ui); font-weight: 600; font-size: var(--fs-500); color: white; }
.section-header-text p { font-size: var(--fs-200); color: rgba(255,255,255,0.55); margin-top: 2px; }
.section-body { padding: var(--sp-5); }

.formula-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px,1fr)); gap: var(--sp-3); }
.formula-card { background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: var(--sp-4); }
.formula-title { font-size: var(--fs-200); font-weight: 700; color: var(--ink-900); text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: var(--sp-2); }
.formula-math { font-family: var(--font-mono); background: var(--chrome-900); color: #9fd1f5; padding: var(--sp-3); border-radius: var(--radius-sm); margin-bottom: var(--sp-2); font-size: var(--fs-300); line-height: 1.6; overflow-x: auto; }
.formula-math sub { font-size: var(--fs-100); }
.formula-explanation { font-size: var(--fs-200); color: var(--ink-500); margin-bottom: var(--sp-2); line-height: 1.6; }
.formula-example { font-size: var(--fs-200); background: var(--accent-tint); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: var(--sp-2) var(--sp-3); line-height: 1.6; color: var(--ink-700); }
.formula-example strong { color: var(--accent); }
.formula-tags { display: flex; flex-wrap: wrap; gap: var(--sp-1); margin-top: var(--sp-2); }
.ftag { display: inline-block; padding: 1px 7px; border-radius: var(--radius-sm); font-size: var(--fs-100); font-weight: 600; letter-spacing: 0.2px; background: var(--surface-2); color: var(--ink-500); }
.ftag.memorize { background: var(--correct-tint); color: var(--correct); }
.ftag.important { background: var(--wrong-tint); color: var(--wrong); }

.ref-table-wrap { margin-top: var(--sp-4); border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line); flex-shrink: 0; }
.ref-table-title { background: var(--chrome-900); color: white; font-size: var(--fs-200); font-weight: 600; padding: var(--sp-2) var(--sp-4); letter-spacing: 0.3px; text-transform: uppercase; }
.ref-table { width: 100%; border-collapse: collapse; font-size: var(--fs-300); }
.ref-table th { background: var(--surface-1); color: var(--ink-500); padding: var(--sp-2) var(--sp-4); text-align: left; font-weight: 600; font-size: var(--fs-100); letter-spacing: 0.3px; text-transform: uppercase; }
.ref-table td { padding: var(--sp-2) var(--sp-4); border-bottom: 1px solid var(--surface-1); color: var(--ink-700); }
.ref-table tr:hover td { background: var(--accent-tint); }
.ref-table td strong { color: var(--ink-900); }

/* ── UNIVERSAL CONSTANTS (formulas.html) ──────────────────────────────────── */
.constants-section { background: var(--chrome-900); border-radius: var(--radius); padding: var(--sp-6); }
.constants-section h2 { font-family: var(--font-ui); font-weight: 600; font-size: var(--fs-500); color: white; margin-bottom: var(--sp-1); }
.constants-section > p { font-size: var(--fs-300); color: rgba(255,255,255,0.55); margin-bottom: var(--sp-4); }
.constants-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px,1fr)); gap: var(--sp-2); }
.constant-item { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); padding: var(--sp-3); border-radius: var(--radius-sm); font-family: var(--font-mono); font-size: var(--fs-300); line-height: 1.5; color: rgba(255,255,255,0.8); }
.constant-item strong { color: #9fd1f5; }

/* Print (formulas.html) */
@media print {
    #sidebar, #topbar, #refArea, #trackerArea { display: none !important; }
    body { background: white; }
    .formula-card, .subject-section { break-inside: avoid; }
}

/* ── RESPONSIVE ────────────────────────────────────────────────────────────── */
@media (max-width: 1200px) { #refArea { display: none; } }
@media (max-width: 900px) {
    .stat-row { grid-template-columns: repeat(2, 1fr); }
    .values-grid, .contact-row, .pillars, .formula-grid { grid-template-columns: 1fr; }
    .page-hero { padding: var(--sp-5) var(--sp-4); }
    .email-card { padding: var(--sp-5) var(--sp-4); }
}
@media (max-width: 560px) {
    .stat-row { grid-template-columns: repeat(2, 1fr); }
    .subject-grid, .toc-grid { grid-template-columns: 1fr; }
}

/* Visible FAQ on formulas.html (mirrors its FAQPage JSON-LD) */
.formula-faq-item { padding: var(--sp-3) 0; border-bottom: 1px solid var(--surface-1); }
.formula-faq-item:last-child { border-bottom: none; }
.formula-faq-item h3 { font-size: var(--fs-300); font-weight: 600; color: var(--ink-900); margin: 0 0 var(--sp-2); }
.formula-faq-item p { margin: 0; color: var(--ink-700); line-height: 1.7; }
