/* GENERATED copy of blog-source/assets/blog.css — edit the source, then run npm run blog:build. */
/*
 * The blog's one stylesheet — every page under /blog/ links this file and nothing else.
 *
 * Drawn to match the redesigned public pages (src/styles/public.css): the professional palette
 * (slate ink, blue-600 actions, cyan accents), the landing's pale sky backdrop with its ruled
 * notebook lines, the landing nav, the app's language picker (LanguageSelect.tsx) and footer.
 * Text and link colours are chosen for WCAG AA (4.5:1) on the surfaces they sit on: prose and meta
 * text live on white cards, never on the tinted page, and small meta text is #475569.
 *
 * Logical properties throughout (margin-inline, inset-inline-end, padding-block…), so the Arabic
 * pages (dir="rtl") need almost no overrides — the few that exist are at the end.
 */

:root {
  --ink: #0f172a;
  --text: #1e293b;
  --text-body: #334155;
  --text-meta: #475569;
  --text-quiet: #64748b; /* 14px and up, or bold small caps: 4.76:1 on white */
  --surface: #ffffff;
  --surface-muted: #f8fafc;
  --tint-sky: #f0f9ff;
  --tint-blue: #eff6ff;
  --tint-cyan: #ecfeff;
  --border: #e2e8f0;
  --border-control: #cbd5e1;
  --border-accent: #bfdbfe;
  --link: #1d4ed8;
  --link-hover: #1e40af;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --ring: #2563eb;
  --accent: #0e7490;
  --page-grad: linear-gradient(135deg, #f8fafc 0%, #f0f9ff 50%, #ecfeff 100%);
  --ruled-line: rgb(148 163 184 / 0.22);
  --ruled-margin: rgb(56 189 248 / 0.5);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-card: 24px;
  --shadow-card: 0 1px 2px rgb(15 23 42 / 0.04), 0 12px 32px -18px rgb(15 23 42 / 0.18);
  --shadow-card-hover: 0 1px 2px rgb(15 23 42 / 0.04), 0 22px 44px -20px rgb(15 23 42 / 0.28);
  --shadow-menu: 0 24px 60px -20px rgb(15 23 42 / 0.4), 0 0 0 1px #e2e8f0;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  /* Native system faces, as on the rest of the site: zero bytes, zero requests. */
  --font: system-ui, -apple-system, "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans",
    Arial, sans-serif;
  --font-ar: system-ui, "SF Arabic", "Segoe UI", "Noto Sans Arabic", "Geeza Pro", Tahoma, sans-serif;
  --measure: 70ch;
  --header-h: 64px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
  position: relative;
  isolation: isolate;
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: #f8fafc var(--page-grad) no-repeat fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
}
:lang(ar) body, body:lang(ar) { font-family: var(--font-ar); }

/* The landing's ruled notebook paper, behind the top of every page, fading out as it goes down.
   Static CSS, no image request; the margin line sits on the inline-start side. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(to right, transparent 0 calc(3.5rem - 1px), var(--ruled-margin) calc(3.5rem - 1px) 3.5rem, transparent 3.5rem),
    repeating-linear-gradient(to bottom, transparent 0 calc(2rem - 1px), var(--ruled-line) calc(2rem - 1px) 2rem);
  -webkit-mask-image: linear-gradient(to bottom, #000 0, transparent 75%);
  mask-image: linear-gradient(to bottom, #000 0, transparent 75%);
  opacity: 0.7;
}
[dir="rtl"] body::before {
  background-image:
    linear-gradient(to left, transparent 0 calc(3.5rem - 1px), var(--ruled-margin) calc(3.5rem - 1px) 3.5rem, transparent 3.5rem),
    repeating-linear-gradient(to bottom, transparent 0 calc(2rem - 1px), var(--ruled-line) calc(2rem - 1px) 2rem);
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--link); }
a:hover { color: var(--link-hover); }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; border-radius: 4px; }

.wrap { width: 100%; max-width: 1152px; margin-inline: auto; padding-inline: 24px; }

.skip-link {
  position: absolute;
  inset-inline-start: 12px;
  top: 12px;
  transform: translateY(-200%);
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--link);
  font-weight: 600;
  box-shadow: var(--shadow-card-hover);
}
.skip-link:focus { transform: none; }

/* ── Header: the landing's nav ─────────────────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgb(255 255 255 / 0.85);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 12px; min-height: var(--header-h); }

.brand { display: inline-flex; align-items: center; gap: 10px; border-radius: var(--radius-sm); text-decoration: none; }
.brand img { width: 32px; height: 32px; object-fit: contain; }
.brand-name { font-size: 1.125rem; font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; color: var(--ink); }

/* "Blog": which part of the site this is, as a small sky pill beside the logo. */
.section-link {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--tint-sky);
  box-shadow: inset 0 0 0 1px #bae6fd;
  color: #0369a1;
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
}
.section-link:hover { background: #e0f2fe; color: #075985; }

.header-actions { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }

/* "Back to site": the way out, first in the header as in the help centre, quiet so the brand leads.
   A hairline separates leaving from where you are. */
.back-to-site {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  min-height: 40px;
  padding: 0 10px;
  margin-inline-start: -10px;
  border-radius: var(--radius-sm);
  color: var(--text-body);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.back-to-site:hover { background: #f1f5f9; color: var(--ink); }
.header-divider { flex-shrink: 0; width: 1px; height: 24px; background: var(--border); }
/* Below desktop the header carries the language, Sign in and Get Started too: the arrow alone says "back". */
@media (max-width: 1023px) {
  .back-label { display: none; }
  .back-to-site { padding: 0 8px; margin-inline-start: -8px; }
}

/* Buttons: the landing's .lc-btn — solid blue-600, a soft blue shadow on hover. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease, box-shadow 0.2s ease, color 0.15s ease;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); color: #fff; box-shadow: 0 12px 28px -12px rgb(37 99 235 / 0.55); }
.btn-ghost { padding: 0 12px; border-radius: var(--radius-sm); color: var(--text-body); }
.btn-ghost:hover { background: #f1f5f9; color: var(--ink); }

/* ── Language menu: the app's picker (LanguageSelect.tsx) ──────────────────────────────────────
   Closed: a globe, the language, a chevron. Open: a small card titled with the menu's name, each
   language in its own script, the one under the pointer or keyboard softly highlighted, the
   current one ticked. A <details> of plain links, so it works with no JavaScript; blog.js adds
   the keyboard and outside-click. */
.lang-menu { position: relative; }
.lang-menu > summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 10px;
  border: 1px solid var(--border-control);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-body);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.lang-menu > summary::-webkit-details-marker { display: none; }
.lang-menu > summary::marker { content: ""; }
.lang-menu > summary:hover { border-color: #94a3b8; }
.lang-menu[open] > summary { border-color: #3b82f6; }
.lang-globe, .lang-chevron { flex-shrink: 0; color: var(--text-quiet); }
.lang-menu[open] .lang-globe, .lang-menu[open] .lang-chevron { color: var(--primary); }
.lang-menu[open] .lang-chevron { transform: rotate(180deg); }
.lang-name { padding-inline-end: 2px; color: var(--text); }

.lang-panel {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + 8px);
  z-index: 70;
  min-width: 12rem;
  padding: 6px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-menu);
  transform-origin: top right;
}
[dir="rtl"] .lang-panel { transform-origin: top left; }
.lang-title {
  margin: 0;
  padding: 8px 12px 6px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-quiet);
}
.lang-list { margin: 0; padding: 0; list-style: none; }
.lang-link {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 44px;
  padding-block: 8px;
  padding-inline: 12px 40px;
  border-radius: var(--radius);
  color: var(--text-body);
  font-size: 0.875rem;
  text-decoration: none;
}
.lang-link:hover, .lang-link:focus { background: var(--tint-sky); color: var(--link-hover); }
.lang-link:focus-visible { outline-offset: -2px; }
.lang-link.current { font-weight: 600; color: var(--link); }
/* The tick on the current language, drawn in its text colour. */
.lang-link.current::after {
  content: "";
  position: absolute;
  inset-inline-end: 12px;
  top: 50%;
  width: 16px;
  height: 16px;
  margin-top: -8px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
}
@keyframes lang-drop {
  from { opacity: 0; transform: translateY(-6px) scale(0.97); }
}
@media (prefers-reduced-motion: no-preference) {
  .lang-chevron { transition: transform 0.2s var(--ease); }
  .lang-menu[open] .lang-panel { animation: lang-drop 0.2s var(--ease); }
}

/* ── Page shell ─────────────────────────────────────────────────────────────────────────────── */

main { flex: 1; padding-block: 36px 64px; }

.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; padding: 0; list-style: none; font-size: 0.875rem; color: var(--text-meta); }
.breadcrumb li + li::before { content: "›"; margin-inline-end: 6px; color: #94a3b8; }
.breadcrumb a { color: var(--text-meta); text-decoration: none; }
.breadcrumb a:hover { color: var(--link-hover); text-decoration: underline; }
.breadcrumb [aria-current="page"] { color: var(--text-body); }

.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0; font-size: 0.875rem; color: var(--text-meta); }
/* The dot trails each item, so a wrapped line never starts with a stray separator. */
.meta > :not(:last-child)::after { content: "·"; margin-inline-start: 10px; color: #94a3b8; }
/* The landing's eyebrow. */
.category {
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
}

/* ── Blog index ─────────────────────────────────────────────────────────────────────────────── */

.blog-hero { max-width: 760px; margin-block: 8px 36px; }
.blog-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(2.125rem, 1.5rem + 2.6vw, 3.25rem);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.025em;
  text-wrap: balance;
  color: var(--ink);
}
.blog-hero .lede { margin: 0; font-size: 1.125rem; line-height: 1.6; color: var(--text-meta); text-wrap: pretty; }

/* The newest post, set apart above the grid: its wide header image beside the title, summary and
   read cue, the whole card one link. Side by side from 900px, stacked below; the columns follow the
   reading direction. It lifts under the pointer like the cards, and its arrow nudges forward. */
.featured {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  overflow: hidden;
  margin-bottom: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.25s var(--ease), transform 0.25s var(--ease), border-color 0.2s ease;
}
.featured:hover { box-shadow: var(--shadow-card-hover); border-color: var(--border-accent); transform: translateY(-3px); }
.featured-media { aspect-ratio: 16 / 9; background: var(--tint-sky); }
.featured-media img { width: 100%; height: 100%; object-fit: cover; }
.featured-media.placeholder { background: linear-gradient(135deg, #dbeafe, #cffafe); }
.featured-body { display: flex; flex-direction: column; justify-content: center; gap: 12px; padding: 24px 22px 26px; }
/* The pill: the site's blue-to-cyan in its deeper shades, so white small text keeps AA contrast. */
.featured-badge {
  align-self: flex-start;
  margin: 0;
  padding: 3px 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #1d4ed8, #0e7490);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.featured-title {
  margin: 0;
  font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2rem);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-wrap: balance;
  color: var(--ink);
}
.featured-title a { color: inherit; text-decoration: none; }
.featured-title a::after { content: ""; position: absolute; inset: 0; } /* whole card clickable, one link */
.featured-title a:hover { color: var(--link); }
.featured-desc { margin: 0; font-size: 1rem; line-height: 1.6; color: var(--text-meta); text-wrap: pretty; }
.featured-cta { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; color: var(--link); font-size: 0.9375rem; font-weight: 600; }
.featured-arrow { flex-shrink: 0; transition: transform 0.2s var(--ease); }
.featured:hover .featured-arrow { transform: translateX(3px); }
[dir="rtl"] .featured-arrow { transform: scaleX(-1); }
[dir="rtl"] .featured:hover .featured-arrow { transform: scaleX(-1) translateX(3px); }
@media (min-width: 900px) {
  .featured { grid-template-columns: 1.3fr 1fr; align-items: center; }
  .featured-body { padding: 32px 36px; }
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}
/* The landing's cards: white, a hairline, a soft shadow; lifted and edged blue under the pointer. */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.25s var(--ease), transform 0.25s var(--ease), border-color 0.2s ease;
}
.card:hover { box-shadow: var(--shadow-card-hover); border-color: var(--border-accent); transform: translateY(-4px); }
.card-media { aspect-ratio: 1 / 1; background: var(--tint-sky); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
/* No image yet: a category-tinted panel with the logo, faint. The logo URL is the one the header
   already loaded, so this costs no extra request. */
.card-media.placeholder { position: relative; }
.card-media.placeholder::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("/images/logo/learning-clarity.svg") center / 72px auto no-repeat;
  opacity: 0.28;
}
.card-media.placeholder[data-category="platform"] { background: linear-gradient(135deg, #dbeafe, #e0f2fe); }
.card-media.placeholder[data-category="measurable"] { background: linear-gradient(135deg, #cffafe, #dbeafe); }
.card-media.placeholder[data-category="workplace"] { background: linear-gradient(135deg, #e0f2fe, #ecfeff); }
.card-media.placeholder[data-category="exam"] { background: linear-gradient(135deg, #ccfbf1, #cffafe); }
.card-media.placeholder[data-category="audio"] { background: linear-gradient(135deg, #dbeafe, #ccfbf1); }
.card-body { display: flex; flex-direction: column; gap: 10px; flex: 1; padding: 20px 22px 24px; }
.card-title { margin: 0; font-size: 1.125rem; line-height: 1.35; font-weight: 700; color: var(--ink); text-wrap: pretty; }
.card-title a { color: inherit; text-decoration: none; }
.card-title a::after { content: ""; position: absolute; inset: 0; } /* whole card clickable, one link */
.card-title a:hover { color: var(--link); }

/* ── Post ───────────────────────────────────────────────────────────────────────────────────── */

/* "Back to blog": a quiet control above the article card, lined up with its edge. 44px tall for touch. */
.post-nav { margin: 0 0 12px; }
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 12px;
  margin-inline-start: -12px;
  border-radius: var(--radius);
  color: var(--text-meta);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
}
.back-link:hover { background: rgb(255 255 255 / 0.8); color: var(--link-hover); }
.back-icon { flex-shrink: 0; }

/* The article takes the page's full width, like the related cards under it. */
.post {
  padding: clamp(22px, 5vw, 56px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}
/* Inside the card everything lines up with the header image's edges. The text keeps a readable
   length: from 1024px "On this page" moves into a sticky column beside it, ending at the image's
   other edge, and the help links and sources below follow the text column; narrower, the text runs
   the card's width and the list stays in the flow, after the introduction. */
.post .prose, .post .aside-block { max-width: none; }
@media (min-width: 1024px) {
  .post .prose { display: grid; grid-template-columns: minmax(0, 1fr) 15rem; column-gap: 48px; align-items: start; }
  .post .prose > * { grid-column: 1; }
  .post .prose > .toc { grid-column: 2; grid-row: 1 / span 300; position: sticky; top: calc(var(--header-h) + 24px); margin: 0; }
  .post .aside-block { max-width: calc(100% - 15rem - 48px); }
}
.post-header { margin-bottom: 24px; }
.post-header h1 {
  margin: 14px 0 0;
  font-size: clamp(1.875rem, 1.3rem + 2.2vw, 2.625rem);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-wrap: balance;
  color: var(--ink);
}
.post-updated { margin: 12px 0 0; font-size: 0.875rem; color: var(--text-meta); }

.post-hero { margin: 0 0 28px; overflow: hidden; border-radius: 18px; aspect-ratio: 16 / 9; background: var(--tint-sky); }
.post-hero img { width: 100%; height: 100%; object-fit: cover; }

.prose { max-width: var(--measure); }
.prose > p, .prose section > p { margin: 0 0 1.1em; font-size: 1.0625rem; line-height: 1.75; color: var(--text-body); text-wrap: pretty; }
.prose h2 {
  margin: 2.2em 0 0.6em;
  font-size: clamp(1.3rem, 2.6vw, 1.55rem);
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.prose h3 { margin: 1.6em 0 0.4em; font-size: 1.1rem; line-height: 1.4; font-weight: 700; color: var(--ink); }
.prose a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose a:hover { text-decoration-thickness: 2px; }

.toc {
  margin: 28px 0 8px;
  padding: 18px 22px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.toc-title { margin: 0 0 8px; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-meta); }
.toc ol { margin: 0; padding-inline-start: 1.2em; display: grid; gap: 4px; }
.toc a { color: var(--text-body); text-decoration: none; font-size: 0.9375rem; }
.toc a:hover { color: var(--link-hover); text-decoration: underline; }

.faq h3 { padding-top: 1.1em; border-top: 1px solid var(--border); }
.faq h2 + h3 { border-top: 0; padding-top: 0; }

/* The call to action: a pale blue-to-cyan panel, the landing's primary button in it. */
.cta {
  margin: 32px 0 8px;
  padding: 24px 26px;
  background: linear-gradient(135deg, var(--tint-blue), var(--tint-cyan));
  border: 1px solid var(--border-accent);
  border-radius: 20px;
}
.cta-title { margin: 0 0 6px; font-size: 1.2rem; font-weight: 700; color: var(--ink); }
.cta p { margin: 0 0 16px; color: var(--text-body); }
.cta .btn { min-height: 44px; padding: 0 20px; font-size: 0.9375rem; }

.aside-block { margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--border); max-width: var(--measure); }
.aside-block h2 { margin: 0 0 12px; font-size: 1.05rem; font-weight: 700; color: var(--ink); }
.help-links ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.help-links a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-muted);
  color: var(--link);
  font-weight: 600;
  text-decoration: none;
}
.help-links a::after { content: "→"; margin-inline-start: auto; color: var(--text-meta); }
.help-links a:hover { border-color: var(--border-accent); background: var(--tint-sky); }
.sources ol { margin: 0; padding-inline-start: 1.3em; display: grid; gap: 6px; font-size: 0.9375rem; color: var(--text-meta); }

.related { max-width: 1152px; margin: 48px auto 0; }
.related > h2 { margin: 0 0 18px; font-size: 1.375rem; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); }
.related .card-title { font-size: 1.05rem; }

/* ── Footer: the landing's ─────────────────────────────────────────────────────────────────────
   The brand and its tagline, then two labelled columns (Resources, Legal), then the copyright. */

.site-footer { background: var(--surface); border-top: 1px solid var(--border); padding-block: 44px 28px; }
.footer-inner { display: grid; gap: 32px; }
.footer-brand .brand img { width: 28px; height: 28px; }
.footer-brand .brand-name { font-size: 1rem; }
.footer-tagline { margin: 8px 0 0; font-size: 0.875rem; color: var(--text-meta); }
.footer-cols { display: grid; grid-template-columns: repeat(2, auto); gap: 24px 56px; justify-content: start; }
.footer-title { margin: 0; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-quiet); }
.footer-links { display: grid; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.footer-links a { display: inline-flex; min-height: 24px; align-items: center; color: var(--text-meta); font-size: 0.875rem; text-decoration: none; }
.footer-links a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
/* The last row: the copyright, and the credit every public page carries. */
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.copyright, .powered-by { margin: 0; font-size: 0.75rem; color: var(--text-quiet); }
.powered-by a { font-weight: 600; color: var(--text-body); text-decoration: none; }
.powered-by a:hover { color: var(--link); text-decoration: underline; text-underline-offset: 4px; }

@media (min-width: 768px) {
  .footer-inner { grid-template-columns: 1fr auto; align-items: start; }
}
/* On a phone the footer centres, as the landing's does. */
@media (max-width: 767px) {
  .site-footer { text-align: center; }
  .footer-brand { display: flex; flex-direction: column; align-items: center; }
  .footer-cols { justify-content: center; text-align: start; }
  .footer-bottom { flex-direction: column; justify-content: center; }
}

/* ── Small screens ──────────────────────────────────────────────────────────────────────────── */

@media (max-width: 640px) {
  :root { --header-h: 56px; }
  .header-actions .btn { display: none; } /* the sign-up is repeated in every post */
  .back-label { display: none; } /* the arrow alone; the link keeps its name */
  .back-to-site { padding: 0 8px; margin-inline-start: -8px; }
  .brand-name { font-size: 1.05rem; }
  main { padding-block: 22px 44px; }
  .wrap { padding-inline: 16px; }
  .post { border-radius: 18px; }
  body::before { background-image: repeating-linear-gradient(to bottom, transparent 0 calc(2rem - 1px), var(--ruled-line) calc(2rem - 1px) 2rem); }
}
@media (max-width: 400px) {
  .header-inner > .brand .brand-name { display: none; }
}
/* The narrowest phones (a folded Fold, 280px and under): the header keeps the way back, the logo and
   the language, and drops the divider and the Blog pill (the breadcrumb under it links the blog);
   a button may wrap rather than run past its panel; the footer columns stack. */
/* A long word in a large heading (French "L’apprentissage", German compounds) breaks, hyphenated
   in the page's language, rather than running past a narrow card. */
.blog-hero h1, .post-header h1, .featured-title, .card-title, .prose h2, .related > h2 {
  overflow-wrap: break-word;
  hyphens: auto;
}
@media (max-width: 340px) {
  .header-divider, .header-inner > .section-link { display: none; }
  .btn { max-width: 100%; white-space: normal; text-align: center; }
  .footer-cols { grid-template-columns: 1fr; justify-items: center; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .card:hover, .featured:hover { transform: none; }
}

/* ── Right-to-left (Arabic) ─────────────────────────────────────────────────────────────────── */

[dir="rtl"] .breadcrumb li + li::before { content: "‹"; }
[dir="rtl"] .help-links a::after { content: "←"; }
[dir="rtl"] .back-icon { transform: scaleX(-1); } /* "back" points right in a right-to-left page */
/* Letter-spacing breaks the joins between Arabic letters, and Arabic has no capitals. */
:lang(ar) .category, :lang(ar) .toc-title, :lang(ar) .lang-title, :lang(ar) .footer-title, :lang(ar) .featured-badge, :lang(ar) .featured-title,
:lang(ar) .blog-hero h1, :lang(ar) .post-header h1, :lang(ar) .prose h2, :lang(ar) .brand-name {
  letter-spacing: normal;
  text-transform: none;
}
:lang(ar) .blog-hero h1, :lang(ar) .post-header h1 { line-height: 1.3; }
:lang(ar) .prose > p, :lang(ar) .prose section > p { line-height: 1.95; }

@media print {
  .site-header, .site-footer, .related, .cta, .skip-link { display: none; }
  body { background: #fff; }
  body::before { display: none; }
  .post { border: 0; box-shadow: none; padding: 0; }
}
