/* Al Huda Schools Build Playbook — V4 design system / spacing and icon QA.
   Keeps the existing brand, copy, URL structure and interaction logic.
   Core grid is multiples of 4px; text rhythm uses 1.55–1.75 line-height. */
:root {
  --v4-1: 4px;
  --v4-2: 8px;
  --v4-3: 12px;
  --v4-4: 16px;
  --v4-5: 20px;
  --v4-6: 24px;
  --v4-8: 32px;
  --v4-10: 40px;
  --v4-12: 48px;
  --v4-16: 64px;
  --v4-copy: 68ch;
  --v4-article: 74ch;
}
/* Text spacing and responsive widths */
html { scroll-padding-top: 94px; }
body { letter-spacing: 0; line-height: 1.65; }
:where(.hero-layout, .process-graphic, .section-heading, .docs-main, .map-panel, .resource, .impact-breakdown-grid, .impact-total-grid, .footer-main, .task) { min-width: 0; }
:where(h1,h2,h3,h4) { text-wrap: balance; overflow-wrap: normal; }
:where(p,li) { text-wrap: pretty; }
h1,h2,h3 { letter-spacing: -.045em; line-height: 1.13; }
h4 {line-height:1.3}
p {line-height:1.68}
/* The old layout used margins independently for heading and paragraph, leading
   to irregular gaps (especially around single-column sections). */
.section { padding: clamp(64px, 6.75vw, 92px) 0; }
.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(0, .84fr);
  align-items: end;
  gap: clamp(20px, 4vw, 54px);
  margin-bottom: clamp(28px, 3.4vw, 40px);
}
.section-heading > div { min-width: 0; }
.section-heading h2 {
  font-size: clamp(35px, 4.15vw, 59px);
  letter-spacing: -.05em;
  line-height: 1.13;
  margin: 10px 0 0;
}
.section-heading p {
  font-size: clamp(15px, 1.1vw, 16px);
  line-height: 1.68;
  max-width: 48ch;
  margin: 0;
}
.section-heading > .text-link {justify-self:start; align-self:end;}
.eyebrow {line-height:1.45;letter-spacing:.115em;}
/* Hero and action spacing */
.hero-layout { gap: clamp(34px, 4.7vw, 72px); padding: clamp(82px, 8.1vw, 112px) 0 clamp(72px, 7.5vw, 104px); }
.hero .hero-title { font-size: clamp(56px, 5.85vw, 94px); line-height: 1.07; letter-spacing: -.063em; margin: 24px 0 22px; }
.hero-description { font-size: clamp(16px, 1.45vw, 18px); line-height:1.68; margin:0 0 26px; max-width:55ch; }
.hero-actions { gap:12px; row-gap:12px; }
.hero-caption { margin:24px 0 0; line-height:1.5; }
.process-graphic { padding: 18px; transform: rotate(.4deg); }
.pipeline {gap:11px}
.pipeline-card { grid-template-columns: 40px minmax(0,1fr) 22px; gap:14px; padding:18px; }
.pipeline-card h3 {font-size:17px;line-height:1.25;letter-spacing:-.035em;margin:0 0 5px}
.pipeline-card p {font-size:12.5px;line-height:1.5;margin:0}
.graphic-top { padding-bottom:17px; }
.graphic-footer { padding-top:18px; }
.stat-grid {padding:24px 0}
.stat {padding: 10px 24px}
.stat strong {line-height:1.1}
.stat span {display:block;line-height:1.5;margin-top:5px}
/* A consistent button size, predictable content gap, and SVG arrows instead
   of font glyphs. SVG cannot accidentally change style/width with OS fonts. */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(14px,2vw,22px);
  min-height: 52px;
  padding: 12px 18px;
  border-radius: 4px;
  font-size:14px;
  font-weight:760;
  line-height:1.35;
  white-space:normal;
  text-align:left;
}
.action-icon { width: 18px; height: 18px; flex: 0 0 18px; stroke:currentColor; display:inline-block; vertical-align:middle; transition: transform .24s var(--ease); }
.button .action-icon { margin-left:auto; }
.button:hover .action-icon, .button:focus-visible .action-icon, .feature-card:hover .feature-arrow { transform:translateX(3px); }
.button--external:hover .action-icon,.button--external:focus-visible .action-icon {transform:translate(3px,-3px)}
.button--download:hover .action-icon,.button--download:focus-visible .action-icon {transform:translateY(3px)}
/* Inline arrows have one fixed icon box and fixed label spacing. */
.text-link { gap: 9px; line-height:1.4; min-height:32px; }
.text-link .action-icon {width:16px;height:16px;flex-basis:16px}
.feature-card .index { margin-bottom: clamp(28px, 4vw, 54px); }
.feature-card .index .feature-arrow {width:18px;height:18px;color:var(--teal-dark);flex-basis:18px}
.feature-card:hover .feature-arrow,.feature-card:focus-visible .feature-arrow { transform: translate(3px,-1px); }
.pipeline-card .pipeline-arrow {width:18px;height:18px;flex-basis:18px;color:#267872}
.resource .external {display:inline-flex;align-items:center;gap:8px;line-height:1.35;}
.resource .external .action-icon {width:15px;height:15px;flex-basis:15px}
.footer-main a:not(.button) {display:inline-flex;align-items:center;max-width:100%;gap:7px;flex-wrap:wrap;margin:9px 0;line-height:1.5}
.footer-main .action-icon--inline {width:13px;height:13px;flex-basis:13px;}
/* Header and dropdown rhythm */
.header-inner {gap:16px}
.desktop-nav {gap:clamp(14px,1.6vw,24px)}
.nav-link {line-height:1.4;}
.mobile-nav {padding:12px 18px 18px}
.mobile-nav a {padding:13px 14px;line-height:1.45}
/* Cards and editorial bands */
.cards-3 {gap:16px}
.feature-card {padding:26px;min-height:248px;display:flex;flex-direction:column;}
.feature-card h3 {margin:0 0 12px;line-height:1.19;letter-spacing:-.04em}
.feature-card p {font-size:14px;line-height:1.65;margin:0;max-width:43ch}
.workflow-band {padding:clamp(64px,7vw,86px) 0}
.workflow-band-inner {gap:clamp(30px,4vw,64px);align-items:center}
.workflow-band h2 {font-size:clamp(43px,5.9vw,80px);line-height:1.03;letter-spacing:-.05em;margin:12px 0 0}
.workflow-band p {line-height:1.72;margin:0 0 22px}
.version-grid {grid-auto-rows:minmax(0,auto)}
.version {min-height:190px;padding:25px 18px;}
.version small {margin:15px 0 9px}
.version p {line-height:1.6}
.alert-panel {padding:22px 25px;line-height:1.6}
.alert-panel p {margin:8px 0 0;line-height:1.65}
/* Human / AI breakdown: consistent spacing from title to description to bar. */
.effort-summary-grid,.impact-total-grid,.impact-breakdown-grid {gap:16px}
.effort-preview {gap:10px;padding:28px;min-height:240px}
.effort-preview-index {line-height:1.5}
.effort-preview>strong {font-size:clamp(64px,6.5vw,94px);line-height:1.04;letter-spacing:-.07em}
.effort-preview>strong small {font-size:21px;line-height:1.2}
.effort-preview-desc {line-height:1.55;font-size:15px}
.effort-preview-percent {line-height:1.5}
.effort-stack-wrap {margin:24px 0 24px}
.effort-stack-caption {gap:12px;line-height:1.5}
.effort-workflow-inner {gap:clamp(30px,4vw,60px)}
.effort-workflow-inner h2 {line-height:1.11;letter-spacing:-.05em;margin:12px 0 18px}
.effort-workflow-inner p {margin-bottom:20px;line-height:1.68}
.effort-workflow-metrics > div {padding:17px 12px}
.impact-total-card {min-height:320px;padding:30px}
.impact-big-num {font-size:clamp(78px,7.6vw,118px);line-height:1.08;margin:11px 0 5px;letter-spacing:-.075em}
.impact-total-card h3 {font-size:24px;line-height:1.25;margin:5px 0 12px}
.impact-total-card p {line-height:1.66;font-size:14px}
.impact-total-percent {padding-top:22px;line-height:1.6}
.impact-distribution {margin-top:24px;padding:24px}
.impact-distribution-heading {margin-bottom:13px;gap:12px;line-height:1.5}
.impact-breakdown-grid {align-items:stretch}
.breakdown-card {padding:28px}
.breakdown-card-head {padding-bottom:18px;gap:14px}
.breakdown-card-head strong {font-size:32px;line-height:1.12}
.breakdown-row {padding:21px 0}
.breakdown-row>div:first-child {align-items:start;gap:16px}
.breakdown-row strong {line-height:1.45;font-size:14px}
.breakdown-row > div > span {font-size:13px;line-height:1.5}
.breakdown-row p {font-size:13.5px;line-height:1.65;margin:8px 0 15px;max-width:51ch}
.breakdown-card-total {padding-top:23px}
.impact-metrics-grid {gap:15px}
.impact-metric {gap:10px;min-height:134px;padding:22px}
.impact-metric strong {line-height:1.1}
.impact-metric span {line-height:1.6}
.impact-outcome-layout {gap:32px;align-items:center}
.impact-outcome h2 {line-height:1.12;letter-spacing:-.045em;margin:13px 0 18px}
.impact-outcome p {margin:0 0 20px}
.impact-outcome-links {gap:12px}
.impact-results-note {margin-top:24px;padding:22px 24px}
.impact-methodology h2 {line-height:1.12;margin:10px 0 28px}
.impact-methodology-grid {gap:22px}
.impact-methodology-grid p {line-height:1.72;padding:18px 0}
/* Secondary page hero + article rhythm */
.page-hero {padding:68px 0 64px}
.page-title {font-size:clamp(46px,5.6vw,76px);line-height:1.09;letter-spacing:-.055em;margin:12px 0 18px}
.impact-hero .page-title {font-size:clamp(45px,5.5vw,76px)}
.page-description {font-size:17px;line-height:1.7;max-width:68ch;margin:0}
.breadcrumb {margin-bottom:22px;line-height:1.4}
.page-tools {margin-top:26px;gap:12px;row-gap:12px}
.docs-body {padding:64px 0 94px}
.docs-layout {gap:44px;grid-template-columns:254px minmax(0,1fr)}
.docs-sidebar {top:104px}
.docs-intro {margin-bottom:40px}
.docs-intro h2 {margin:0 0 16px;line-height:1.15}
.docs-intro p {max-width:var(--v4-copy);font-size:16px;line-height:1.72;margin:0}
.chapter {padding:40px 0 44px}
.chapter-head {gap:18px;margin-bottom:24px}
.chapter-head h2 {line-height:1.2;letter-spacing:-.045em}
.prose {line-height:1.74;overflow-wrap:break-word}
.prose p {font-size:15.5px;line-height:1.74;max-width:var(--v4-article);margin-bottom:17px}
.prose h2 {margin:30px 0 14px;line-height:1.23}
.prose h3 {margin:32px 0 13px;line-height:1.28}
.prose h4 {margin:27px 0 12px;line-height:1.34}
.prose ul,.prose ol {margin:0 0 20px;padding-left:25px}
.prose li {margin:7px 0;line-height:1.72;padding-left:3px}
.prose blockquote {padding:17px 22px;margin:22px 0}
.prose th,.prose td {padding:12px 14px;line-height:1.6}
.prose pre {margin:20px 0;line-height:1.6}
.chapter-head .copy-anchor {margin-top:3px;}
/* Process cards, sitemap, task tracker, resources */
.process-list {gap:16px}
.process-step {grid-template-columns:90px minmax(0,1fr);gap:28px;padding:30px 34px}
.process-step .stage-id small {margin-top:12px}
.process-step h2 {font-size:clamp(27px,2.55vw,32px);line-height:1.2;margin:0 0 12px}
.process-step p {line-height:1.7;margin:0 0 14px}
.process-step ul {margin:0;padding-left:22px}
.process-step li {line-height:1.6;padding:4px 0}
.process-step .stage-cta {margin-top:18px}
.map-panel {padding:26px}
.map-panel-title {margin-bottom:18px;padding-bottom:17px}
.map-route {gap:14px;padding:11px 0}
.map-route strong {min-width:126px;line-height:1.45}
.map-route code {line-height:1.55}
.map-caption {line-height:1.6;margin:15px 0 0}
.launch-summary {padding:29px;gap:24px;margin-bottom:27px}
.launch-summary h2 {line-height:1.2}
.task-group {margin:32px 0 40px}
.task-group h2 {margin:0 0 18px;line-height:1.2}
.task-list {gap:10px}
.task {gap:18px;padding:17px 19px}
.task-heading {font-size:14px;line-height:1.5}
.task-desc {font-size:13px;line-height:1.55;margin:5px 0 0}
.task select {min-height:44px;font-size:13px}
.resource-grid {gap:16px}
.resource {padding:26px}
.resource h2 {font-size:22px;line-height:1.23;letter-spacing:-.04em;margin:13px 0 11px}
.resource p {font-size:14px;line-height:1.65;margin:0 0 14px;max-width:49ch}
/* Footer spacing and wrapping */
.site-footer {padding:60px 0 28px}
.footer-main {gap:clamp(24px,4.5vw,62px);padding-bottom:46px}
.footer-main h2 {line-height:1.16;margin:14px 0 17px}
.footer-main p {line-height:1.7;margin:0;max-width:49ch}
.footer-main h3 {margin:5px 0 18px}
.footer-bottom {padding-top:24px;gap:18px;line-height:1.6}
/* Tablet transitions */
@media(max-width:1100px) {
  .hero-layout {grid-template-columns:1fr;gap:36px;padding:72px 0}
  .process-graphic {transform:none;margin:0;max-width:680px}
  .section-heading {grid-template-columns:minmax(0,1.2fr) minmax(0,.8fr)}
}
@media(max-width:980px) {
  .docs-layout {grid-template-columns:1fr;gap:24px}
  .footer-main {gap:30px}
  .impact-outcome-layout,.effort-workflow-inner {grid-template-columns:1fr;gap:24px}
}
@media(max-width:720px) {
  .container {width:calc(100% - 36px)}
  .section {padding:64px 0}
  .section-heading {grid-template-columns:1fr;gap:15px;margin-bottom:30px}
  .section-heading h2 {font-size:clamp(33px,8.6vw,43px);margin:10px 0 0;line-height:1.14}
  .section-heading p {font-size:15.5px;line-height:1.67;margin:0;max-width:58ch}
  .section-heading > .text-link {margin:0}
  .hero-layout {padding:64px 0;gap:34px}
  .hero .hero-title {font-size:clamp(48px,9.8vw,70px);line-height:1.1;margin:20px 0 19px}
  .hero-description {font-size:16.5px;line-height:1.68;margin-bottom:24px}
  .page-hero {padding:54px 0 56px}
  .page-title {font-size:clamp(42px,9.5vw,62px);line-height:1.1;margin:12px 0 18px}
  .impact-hero .page-title {font-size:clamp(40px,9.4vw,62px)}
  .page-description {font-size:16px;line-height:1.68}
  .breadcrumb {margin-bottom:18px}
  .docs-body {padding:52px 0 78px}
  .docs-intro {margin-bottom:34px}
  .chapter {padding:35px 0 42px}
  .process-step {grid-template-columns:1fr;gap:15px;padding:26px}
  .process-step .stage-id {font-size:42px}
  .process-step .stage-id small {margin-top:6px}
  .process-step h2 {font-size:27px}
  .cards-3,.resource-grid {grid-template-columns:1fr;gap:14px}
  .feature-card {padding:24px;min-height:0}
  .feature-card .index {margin-bottom:28px}
  .workflow-band {padding:64px 0}
  .workflow-band-inner {display:grid;gap:26px}
  .workflow-band h2 {font-size:clamp(41px,9vw,58px);line-height:1.06}
  .workflow-band p {margin:0 0 20px}
  .effort-summary-grid,.impact-total-grid,.impact-breakdown-grid {grid-template-columns:1fr}
  .impact-metrics-grid {grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
  .impact-total-card {min-height:0}
  .impact-methodology-grid {grid-template-columns:1fr;gap:8px}
  .effort-stack-caption {gap:7px}
  .stat-grid {padding:16px 0}
  .stat {padding:13px 16px}
  .footer-main {gap:30px}
}
@media(max-width:520px) {
  .container {width:calc(100% - 34px)}
  .site-header {height:70px}
  .header-inner {gap:11px}
  .brand-icon {width:46px;height:46px}
  .brand-name {font-size:13.5px}
  .brand-kicker {font-size:9px}
  .hero .hero-title {font-size:clamp(44px,11.5vw,58px)}
  .hero-layout {padding:58px 0 64px;gap:30px}
  .hero-actions .button {width:100%}
  .hero-caption {margin-top:22px}
  .process-graphic {padding:13px}
  .pipeline-card {grid-template-columns:32px minmax(0,1fr) 18px;gap:10px;padding:14px}
  .pipeline-card h3 {font-size:16px}
  .pipeline-card p {font-size:12px;line-height:1.45}
  .stat {padding:12px}
  .stat:first-child,.stat:nth-child(3) {padding-left:0}
  .stat strong {font-size:29px}
  .stat span {font-size:10.5px;line-height:1.45}
  .section {padding:56px 0}
  .section-heading {margin-bottom:25px;gap:13px}
  .section-heading h2 {font-size:clamp(31px,8.5vw,39px)}
  .workflow-band {padding:56px 0}
  .workflow-band h2 {font-size:clamp(37px,9.4vw,44px)}
  .version {padding:20px 16px;min-height:0}
  .version small {margin:10px 0 7px}
  .effort-preview {min-height:0;padding:23px}
  .effort-preview>strong {font-size:clamp(60px,15vw,76px)}
  .effort-stack-caption {display:flex;flex-direction:column;align-items:start}
  .impact-hero .page-title {font-size:clamp(37px,9.6vw,48px)}
  .impact-total-card {padding:24px}
  .impact-big-num {font-size:clamp(73px,19vw,94px)}
  .impact-total-card h3 {font-size:23px}
  .impact-distribution {padding:20px}
  .breakdown-card {padding:22px}
  .breakdown-card-head {gap:10px}
  .breakdown-card-head strong {font-size:30px}
  .breakdown-row {padding:18px 0}
  .breakdown-row p {font-size:13.5px;margin:7px 0 13px}
  .breakdown-card-total {padding-top:21px}
  .impact-metric {min-height:0;padding:19px;gap:7px}
  .impact-metric strong {font-size:33px}
  .impact-metric span {font-size:12.5px}
  .docs-intro h2 {font-size:clamp(29px,7.7vw,35px)}
  .chapter-head {gap:12px;margin-bottom:19px}
  .chapter-head h2 {font-size:clamp(25px,7vw,30px)}
  .prose,.prose p {font-size:15px;line-height:1.72}
  .prose h3 {font-size:20px;line-height:1.3;margin:27px 0 12px}
  .prose h4 {font-size:17px}
  .map-panel {padding:22px}
  .map-route {display:block}
  .map-route strong {display:block;margin-bottom:4px}
  .task {grid-template-columns:1fr;gap:10px}
  .task select {max-width:280px;width:100%}
  .resource {padding:23px}
  .resource h2 {font-size:21px}
  .footer-main {grid-template-columns:1fr;gap:26px;padding-bottom:35px}
  .footer-main > div:first-child {grid-column:auto}
  .footer-main h2 {font-size:29px}
  .footer-bottom {display:grid;gap:10px}
  .footer-bottom span:last-child {margin:0;text-align:left}
}
@media(max-width:359px) {
  .container {width:calc(100% - 28px)}
  .hero .hero-title {font-size:clamp(35px,11.3vw,42px)}
  .page-title {font-size:clamp(35px,10.4vw,41px)}
  .impact-hero .page-title {font-size:clamp(33px,9.8vw,38px)}
  .section-heading h2 {font-size:clamp(27px,9vw,34px)}
  .workflow-band h2 {font-size:clamp(33px,9.3vw,39px)}
  .version-grid,.impact-metrics-grid {grid-template-columns:1fr}
  .stat {padding:12px 10px}
  .stat strong {font-size:27px}
  .breakdown-card {padding:19px}
  .breakdown-row > div:first-child {gap:10px}
  .breakdown-row strong {font-size:13px}
  .breakdown-row > div > span {font-size:12px}
  .impact-total-card {padding:22px}
  .impact-big-num {font-size:clamp(69px,19vw,86px)}
  .effort-preview {padding:21px}
  .effort-preview>strong {font-size:clamp(54px,16vw,62px)}
  .button {gap:12px;min-height:48px;padding:11px 13px;font-size:13px}
  .task {padding:16px}
  .map-panel {padding:18px}
}
@media(prefers-reduced-motion:reduce) {
  html {scroll-behavior:auto}
  .action-icon {transition:none!important}
}
@media print {
  .section{padding:26px 0}
  .hero-layout{padding:28px 0}
}
.inline-arrow-link {display:inline-flex;align-items:center;gap:7px;flex-wrap:wrap;line-height:1.5;}
.inline-arrow-link .action-icon {width:14px;height:14px;flex-basis:14px;}
.utility-icon {display:inline-block;vertical-align:middle;width:18px;height:18px;flex:0 0 18px;stroke:currentColor;}
.button .utility-icon {margin-left:auto;}
.search-trigger .utility-icon {width:16px;height:16px;flex-basis:16px;}
