/**
 * OLA Past Papers — scoped type scale (prod seed, 2026-11-14).
 * This file was created on production only to carry the past-papers
 * CSS. Other scopes (Insights, etc.) are staging-only and NOT present
 * here. See CHANGELOG.md for the deploy context.
 */

/* === PAST PAPERS — scope .ola-pastpapers (v1, 2026-11-14) ======================
 * Element-level px, scoped through .ola-pastpapers to beat theme defaults
 * without !important. Template sets NO font-sizes. Spec mirrors Insights.
 * ================================================================== */
.ola-pastpapers { --ink:#1B2A4A; --coral:#E2736E; --teal:#35707F; --muted:#6B7280; --muted2:#8A94A6; --mint:#8FD8C2;
	--cream:#F7F3EE; --warm:#FBF8F4; --cool:#F3F7F8; --hair:#F0ECE5; --inner:#F9F6F2;
	font-family:'Poppins', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
	color:var(--ink); font-size:13px; line-height:1.5;
	max-width:1120px; margin:0 auto; padding:24px 0; }
.ola-pastpapers *, .ola-pastpapers *::before, .ola-pastpapers *::after { box-sizing:border-box; }
.ola-pastpapers a { color:inherit; }

/* Breadcrumb */
.ola-pastpapers .ola-pastpapers__breadcrumb { font-size:12px; line-height:1.4; color:var(--muted); margin:0 0 12px; display:flex; flex-wrap:wrap; gap:6px; }
.ola-pastpapers .ola-pastpapers__breadcrumb a { color:var(--muted); text-decoration:none; }
.ola-pastpapers .ola-pastpapers__breadcrumb a:hover { color:var(--ink); text-decoration:underline; }
.ola-pastpapers .ola-pastpapers__crumb-current { color:var(--ink); }

/* Heading + lede */
.ola-pastpapers .ola-pastpapers__h1   { font-size:26px; line-height:1.2; font-weight:700; margin:0 0 8px; color:var(--ink); }
.ola-pastpapers .ola-pastpapers__lede { font-size:12px; line-height:1.5; color:var(--muted); margin:0 0 24px; }

/* Layout — main + rail */
.ola-pastpapers .ola-pastpapers__layout { display:grid; grid-template-columns:1fr 320px; gap:24px; align-items:start; }
.ola-pastpapers .ola-pastpapers__main   { min-width:0; }
.ola-pastpapers .ola-pastpapers__rail   { background:#fff; border-radius:12px; padding:24px; }

/* Switchers */
.ola-pastpapers .ola-pastpapers__switcher       { display:flex; align-items:center; gap:12px; margin:0 0 16px; flex-wrap:wrap; }
.ola-pastpapers .ola-pastpapers__switcher-label { font-size:10px; letter-spacing:1px; text-transform:uppercase; font-weight:600; color:var(--muted); }
.ola-pastpapers .ola-pastpapers__switcher-pills { display:flex; flex-wrap:wrap; gap:8px; }
.ola-pastpapers .ola-pastpapers__pill { font-size:13px; line-height:1; font-weight:500; padding:10px 14px; border-radius:999px; background:#fff; border:1px solid #E2DED6; color:var(--ink); text-decoration:none; min-height:44px; display:inline-flex; align-items:center; }
.ola-pastpapers .ola-pastpapers__pill:hover    { border-color:var(--ink); }
.ola-pastpapers .ola-pastpapers__pill.is-active { background:var(--ink); color:#fff; border-color:var(--ink); }

/* Year filter */
.ola-pastpapers .ola-pastpapers__years { display:flex; flex-wrap:wrap; gap:8px; margin:0 0 20px; }
.ola-pastpapers .ola-pastpapers__year  { font-size:13px; line-height:1; font-weight:500; padding:10px 14px; border-radius:999px; background:#fff; border:1px solid #E2DED6; color:var(--ink); cursor:pointer; min-height:44px; font-family:inherit; }
.ola-pastpapers .ola-pastpapers__year:hover    { border-color:var(--ink); }
.ola-pastpapers .ola-pastpapers__year.is-active { background:var(--ink); color:#fff; border-color:var(--ink); }

/* Table */
.ola-pastpapers .ola-pastpapers__table-wrap { background:#fff; border-radius:12px; padding:8px 8px 4px; overflow-x:auto; }
.ola-pastpapers .ola-pastpapers__table { width:100%; border-collapse:collapse; }
.ola-pastpapers .ola-pastpapers__table th { font-size:10px; line-height:1.2; letter-spacing:1px; font-weight:600; text-transform:uppercase; color:var(--muted); text-align:left; padding:14px 12px; border-bottom:1px solid var(--hair); }
.ola-pastpapers .ola-pastpapers__table td { font-size:13px; line-height:1.5; color:var(--ink); padding:12px; border-bottom:1px solid var(--hair); vertical-align:middle; }
.ola-pastpapers .ola-pastpapers__table tbody tr:last-child td { border-bottom:0; }
.ola-pastpapers .ola-pastpapers__cell-sitting { font-weight:600; }
.ola-pastpapers .ola-pastpapers__dl       { display:inline-flex; align-items:center; justify-content:center; padding:8px 12px; border-radius:999px; border:1px solid #D8DEE6; text-decoration:none; color:var(--ink); min-height:40px; font-size:13px; font-weight:500; }
.ola-pastpapers .ola-pastpapers__dl:hover { border-color:var(--ink); }
.ola-pastpapers .ola-pastpapers__dl-empty { color:var(--muted2); font-size:13px; }
.ola-pastpapers .ola-pastpapers__all-group { display:flex; flex-wrap:wrap; gap:6px; }
.ola-pastpapers .ola-pastpapers__chip     { font-size:12px; font-weight:600; line-height:1; padding:8px 10px; border-radius:999px; background:var(--warm); color:var(--ink); text-decoration:none; min-height:36px; display:inline-flex; align-items:center; }
.ola-pastpapers .ola-pastpapers__chip:hover { background:#efe8dc; }

.ola-pastpapers .ola-pastpapers__empty { font-size:13px; line-height:1.5; color:var(--muted); margin:16px 0; }

/* Request strip */
.ola-pastpapers .ola-pastpapers__request       { background:#fff; border:2px solid var(--coral); border-radius:12px; padding:24px; margin-top:24px; }
.ola-pastpapers .ola-pastpapers__request-h2    { font-size:17px; line-height:1.3; font-weight:700; margin:0 0 4px; color:var(--ink); }
.ola-pastpapers .ola-pastpapers__request-lede  { font-size:12px; line-height:1.4; color:var(--muted); margin:0 0 14px; }
.ola-pastpapers .ola-pastpapers__request-form  { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; }
.ola-pastpapers .ola-pastpapers__request-form input[type=text],
.ola-pastpapers .ola-pastpapers__request-form input[type=email] { font-size:13px; padding:12px 14px; border-radius:10px; border:1px solid #E2DED6; min-height:44px; background:#fff; color:var(--ink); font-family:inherit; }
.ola-pastpapers .ola-pastpapers__request-form input:focus { outline:none; border-color:var(--ink); }
.ola-pastpapers .ola-pastpapers__hp { position:absolute; left:-9999px; width:1px; height:1px; opacity:0; }
.ola-pastpapers .ola-pastpapers__btn-primary { font-size:13px; line-height:1; font-weight:600; font-family:inherit; background:var(--ink); color:#fff; border:0; border-radius:999px; padding:12px 20px; min-height:44px; cursor:pointer; }
.ola-pastpapers .ola-pastpapers__btn-primary:hover    { background:#13213b; }
.ola-pastpapers .ola-pastpapers__btn-primary[disabled] { background:#C9CED9; cursor:not-allowed; }
.ola-pastpapers .ola-pastpapers__request-ack  { font-size:12px; line-height:1.4; color:var(--teal); margin:10px 0 0; }

/* Right rail — Go further */
.ola-pastpapers .ola-pastpapers__rail-h2 { font-size:17px; line-height:1.3; font-weight:700; margin:0 0 12px; color:var(--ink); }
.ola-pastpapers .ola-pastpapers__rail-list { display:flex; flex-direction:column; gap:12px; }
.ola-pastpapers .ola-pastpapers__rail-card { display:grid; grid-template-columns:72px 1fr; gap:12px; align-items:center; padding:10px; border-radius:10px; background:var(--warm); text-decoration:none; color:var(--ink); min-height:72px; }
.ola-pastpapers .ola-pastpapers__rail-card:hover { background:#efe8dc; }
.ola-pastpapers .ola-pastpapers__rail-cover { display:block; width:72px; height:72px; border-radius:8px; background:#eee center/cover no-repeat; }
.ola-pastpapers .ola-pastpapers__rail-title { font-size:13px; line-height:1.4; font-weight:600; }

/* Mobile — stacked cards + full-width rail */
@media (max-width:860px){
	.ola-pastpapers .ola-pastpapers__layout       { grid-template-columns:1fr; }
	.ola-pastpapers .ola-pastpapers__request-form { grid-template-columns:1fr; }
	.ola-pastpapers .ola-pastpapers__table-wrap   { background:transparent; padding:0; }
	.ola-pastpapers .ola-pastpapers__table thead  { display:none; }
	.ola-pastpapers .ola-pastpapers__table, .ola-pastpapers .ola-pastpapers__table tbody, .ola-pastpapers .ola-pastpapers__table tr, .ola-pastpapers .ola-pastpapers__table td { display:block; width:100%; }
	.ola-pastpapers .ola-pastpapers__table tr     { background:#fff; border-radius:12px; margin-bottom:12px; padding:14px; }
	.ola-pastpapers .ola-pastpapers__table td     { border-bottom:0; padding:8px 0; display:flex; justify-content:space-between; align-items:center; gap:12px; }
	.ola-pastpapers .ola-pastpapers__table td::before { content:attr(data-label); font-size:10px; letter-spacing:1px; text-transform:uppercase; color:var(--muted); font-weight:600; }
	.ola-pastpapers .ola-pastpapers__cell-sitting { justify-content:flex-start; padding-bottom:12px; border-bottom:1px solid var(--hair); margin-bottom:6px; font-size:17px; font-weight:700; }
	.ola-pastpapers .ola-pastpapers__cell-sitting::before { display:none; }
	.ola-pastpapers .ola-pastpapers__dl { min-height:44px; }
}

/* === PAST PAPERS — append 2026-11-15 ============================================
 * Grade-index subject cards + full-width table when the right rail is absent.
 * Belongs inside the .ola-pastpapers scope; no new global selectors.
 * ============================================================================== */

/* Subject cards — rendered on /past-papers/<grade>/ (grade set, no subject) */
.ola-pastpapers .ola-pastpapers__subject-cards { display:grid; grid-template-columns:repeat(3,1fr); gap:16px; margin:0 0 20px; }
.ola-pastpapers .ola-pastpapers__subject-card { display:flex; flex-direction:column; gap:6px; padding:20px; background:#fff; border-radius:12px; text-decoration:none; color:var(--ink); min-height:96px; border:1px solid var(--hair); transition:border-color 0.15s ease; }
.ola-pastpapers .ola-pastpapers__subject-card:hover { border-color:var(--ink); }
.ola-pastpapers .ola-pastpapers__subject-card-name  { font-size:15px; line-height:1.3; font-weight:600; color:var(--ink); }
.ola-pastpapers .ola-pastpapers__subject-card-count { font-size:12px; line-height:1.4; color:var(--muted); }
.ola-pastpapers .ola-pastpapers__subjects-more      { font-size:12px; line-height:1.5; color:var(--muted); margin:0 0 20px; }

/* Fix 2 — when the right rail is absent, the main column takes the full width.
 * Table columns other than Sitting shrink to content so Sitting absorbs the slack. */
.ola-pastpapers .ola-pastpapers__layout:not(:has(> .ola-pastpapers__rail)) { grid-template-columns:1fr; }
.ola-pastpapers .ola-pastpapers__layout:not(:has(> .ola-pastpapers__rail)) .ola-pastpapers__table th:not(:first-child),
.ola-pastpapers .ola-pastpapers__layout:not(:has(> .ola-pastpapers__rail)) .ola-pastpapers__table td:not(.ola-pastpapers__cell-sitting) { width:1%; white-space:nowrap; }

/* Mobile — one card per row */
@media (max-width:860px){
	.ola-pastpapers .ola-pastpapers__subject-cards { grid-template-columns:1fr; }
}

/* 2026-11-15 — Past papers table: cap at ~900px, even columns.
 * Overrides the earlier "Sitting absorbs slack" rule (lines 318-320) so
 * every column sizes evenly instead of letting Sitting fill remaining space.
 * Width/layout only — colours and styling are unchanged. */
.ola-pastpapers .ola-pastpapers__table-wrap { max-width:900px; margin-left:auto; margin-right:auto; }
.ola-pastpapers .ola-pastpapers__table { table-layout:fixed; }
.ola-pastpapers .ola-pastpapers__layout:not(:has(> .ola-pastpapers__rail)) .ola-pastpapers__table th:not(:first-child),
.ola-pastpapers .ola-pastpapers__layout:not(:has(> .ola-pastpapers__rail)) .ola-pastpapers__table td:not(.ola-pastpapers__cell-sitting) { width:auto; white-space:normal; }

/* 2026-11-15 v2 — Harden the even-columns width override to win by SPECIFICITY,
 * not source order. Same elements, same values as the preceding override;
 * specificity is raised by self-chaining .ola-pastpapers (duplicating a class
 * that is already on the wrapper, with no markup change). Earlier rule (0,4,2
 * for th, 0,5,1 for td) is now beaten on specificity alone. */
.ola-pastpapers.ola-pastpapers .ola-pastpapers__layout:not(:has(> .ola-pastpapers__rail)) .ola-pastpapers__table th:not(:first-child),
.ola-pastpapers.ola-pastpapers .ola-pastpapers__layout:not(:has(> .ola-pastpapers__rail)) .ola-pastpapers__table td:not(.ola-pastpapers__cell-sitting) { width:auto; white-space:normal; }
