/* GBU canevas site. Colours from the IFES palette: indigo, yellow, lime, sky, violet. */
:root {
  color-scheme: light;
  --indigo: #251F4F;
  --indigo-2: #4F4898;
  --yellow: #FDC400;
  --lime: #C7D53A;
  --sky: #73CAEA;
  --violet: #A076B2;
  --ink: #1D1A38;
  --ink-2: #3B3760;
  --muted: #5A5677;
  --on-dark: #D9D6EE;
  --ground: #F4F3F9;
  --paper: #FFFFFF;
  --tint: #EDEBF7;
  --line: #E6E4F0;
  --line-soft: #F0EEF6;
  --border: #CFCCE0;
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --text: "Open Sans", "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 16px/1.6 var(--text); }
a { color: var(--indigo); }
a:hover { color: var(--indigo-2); }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: 1120px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.strong { font-weight: 600; }
h1, h2 { font-family: var(--display); font-weight: 700; text-transform: uppercase; color: var(--indigo); margin: 0; }
h2 { font-size: 28px; line-height: 1.1; }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.eyebrow.yellow { color: var(--yellow); }
.lime { color: var(--lime); }

/* Top bar */
.bar { background: var(--indigo); color: #fff; }
.bar-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 14px; }
.mark { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; }
.mark:hover { color: #fff; }
.badge { width: 36px; height: 36px; border-radius: 50%; background: var(--yellow); color: var(--indigo); display: flex; align-items: center; justify-content: center; font: 700 16px var(--display); }
.word { font: 600 20px var(--display); letter-spacing: .06em; text-transform: uppercase; }
.nav { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 15px; font-weight: 600; }
.nav a { color: var(--on-dark); text-decoration: none; padding: 10px 0; }
.nav a.on, .nav a:hover { color: var(--yellow); }
.english-download { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); overflow-wrap: anywhere; }

/* Index hero */
.hero { background: var(--indigo); color: #fff; }
.hero-row { display: flex; flex-wrap: wrap; align-items: center; gap: 32px; padding-top: 40px; padding-bottom: 64px; }
.hero-in { flex: 999 1 520px; display: flex; flex-direction: column; gap: 16px; }
.hero-img { flex: 1 1 340px; min-width: 0; width: 100%; max-width: 460px; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 16px; }
.hero h1 { color: #fff; font-size: clamp(40px, 7vw, 60px); line-height: 1; }
.lead { margin: 0; font-size: 17px; color: var(--on-dark); max-width: 640px; }
.stats { display: flex; flex-wrap: wrap; gap: 32px; padding-top: 8px; }
.stats b { display: block; font: 700 40px/1.1 var(--display); }
.stats span { font-size: 14px; color: var(--on-dark); }

/* Index list */
.list { padding-bottom: 80px; display: flex; flex-direction: column; gap: 40px; }
.tools { margin-top: -32px; background: var(--paper); border-radius: 12px; box-shadow: 0 6px 24px rgba(37,31,79,.10); padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.search { display: flex; align-items: center; gap: 12px; border: 2px solid var(--border); border-radius: 8px; padding: 0 14px; min-height: 50px; color: var(--muted); }
.search:focus-within { border-color: var(--indigo); }
.search input { flex: 1; min-width: 0; border: 0; font: inherit; font-size: 16px; color: var(--ink); background: transparent; outline: none; padding: 12px 0; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 2px solid var(--border); background: var(--paper); color: var(--indigo); font: 600 14px var(--text); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.filter span { font-weight: 400; opacity: .75; }
.filter[aria-pressed="true"] { background: var(--indigo); border-color: var(--indigo); color: #fff; }
.block { display: flex; flex-direction: column; gap: 16px; }
.block-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; }
.ready-list { display: flex; flex-direction: column; gap: 16px; }
.ready { text-decoration: none; color: inherit; background: var(--paper); border-radius: 12px; overflow: hidden; display: grid; grid-template-columns: 340px minmax(0, 1fr); box-shadow: 0 2px 10px rgba(37,31,79,.08); transition: box-shadow .15s, transform .15s; }
.ready:hover { color: inherit; box-shadow: 0 8px 28px rgba(37,31,79,.16); transform: translateY(-1px); }
.ready-band { min-width: 0; display: flex; flex-direction: column; color: var(--indigo); }
.ready-band img { display: block; width: 100%; height: 170px; object-fit: cover; }
.ready-label { flex: 1; padding: 20px 24px; display: flex; flex-direction: column; justify-content: space-between; gap: 12px; }
.ready-name { font: 700 32px/.95 var(--display); text-transform: uppercase; overflow-wrap: anywhere; }
.ready-name.long { font-size: 25px; line-height: 1; }
.ready-body { min-width: 0; padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.ready-body h3 { margin: 0; font-size: 24px; line-height: 1.3; color: var(--indigo); }
.ready-body p { margin: 0; color: var(--ink-2); }
.chips { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; }
/* A fixed corner radius keeps wrapped labels inside their background. */
.chip { max-width: 100%; min-width: 0; overflow-wrap: anywhere; background: var(--tint); color: var(--indigo); padding: 6px 12px; border-radius: 16px; font-size: 13px; font-weight: 600; }
.chip:empty { display: none; }
.chip.dark { background: var(--indigo); color: #fff; font-size: 14px; }
.chip.light { background: #fff; color: var(--indigo); font-size: 14px; }
.go { margin-top: auto; padding-top: 4px; display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--indigo); }
.group { background: var(--paper); border-radius: 12px; overflow: hidden; }
.group-head { padding: 16px 20px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.group-head h3 { margin: 0; font-size: 17px; color: var(--indigo); }
.dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.count { margin-left: auto; font-size: 14px; color: var(--muted); }
.group ul { margin: 0; padding: 0; list-style: none; }
.group li { padding: 14px 20px; display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: baseline; border-bottom: 1px solid var(--line-soft); }
.group li:last-child { border-bottom: 0; }
.group .n { width: 56px; font-size: 13px; font-weight: 700; color: var(--muted); }
.group .t { flex: 999 1 300px; font-size: 15px; line-height: 1.5; }
.group .f { font-size: 13px; color: var(--muted); }
.empty { background: var(--paper); border-radius: 12px; padding: 32px; text-align: center; color: var(--muted); margin: 0; }

/* Detail */
.title-band { color: var(--indigo); }
.title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 32px; padding-top: 24px; padding-bottom: 48px; }
.title-in { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.title-img { flex: 1 1 320px; min-width: 0; width: 100%; max-width: 440px; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 16px; box-shadow: 0 8px 28px rgba(37,31,79,.25); }
.back { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; text-decoration: none; min-height: 44px; align-self: flex-start; }
.title-band h1 { font-size: clamp(48px, 9vw, 80px); line-height: .9; overflow-wrap: anywhere; }
.subtitle { margin: 0; font-size: clamp(19px, 3vw, 24px); font-weight: 600; }
.detail { padding-top: 40px; padding-bottom: 80px; display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.detail-main { flex: 999 1 560px; min-width: 0; }
/* Long Malagasy words must fit inside objective rows and download labels. */
.lang-body, .dl { overflow-wrap: anywhere; }
.lang-body { display: flex; flex-direction: column; gap: 32px; }
.lang-body > section { display: flex; flex-direction: column; gap: 16px; }
.detail-side { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 16px; position: sticky; top: 16px; }
.panel { background: var(--paper); border-radius: 12px; padding: 28px; }
.central { background: var(--indigo); color: #fff; border-radius: 12px; padding: 32px; display: flex; flex-direction: column; gap: 14px; }
.central p { margin: 0; color: var(--on-dark); font-size: 15px; }
.central p.big { color: #fff; font: 600 clamp(26px, 3.6vw, 34px)/1.15 var(--display); }
.central strong { color: #fff; }
.verses { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.verse { margin: 0; background: var(--paper); border-radius: 12px; padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.verse blockquote { margin: 0; font-style: italic; }
.verse figcaption { font-size: 14px; font-weight: 700; color: var(--indigo-2); }
.verse p { margin: 0; font-size: 14px; color: var(--ink-2); }
.panel p.muted { margin: 0; }
.objectives { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.objectives li { display: flex; gap: 14px; align-items: flex-start; }
.num { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--tint); color: var(--indigo); font-weight: 700; font-size: 14px; display: flex; align-items: center; justify-content: center; }
.num.sq { border-radius: 6px; }
.timebar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; gap: 3px; }
.steps { margin: 0; padding: 0; list-style: none; }
.steps li { display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 14px 0; border-top: 1px solid var(--line-soft); align-items: baseline; }
.mins { flex: none; width: 72px; font-size: 14px; font-weight: 700; color: var(--indigo); border-left: 4px solid; padding-left: 8px; }
.step-name { flex: 1 1 200px; font-weight: 700; }
.step-what { flex: 999 1 300px; font-size: 15px; color: var(--ink-2); }
.download { box-shadow: 0 6px 24px rgba(37,31,79,.10); padding: 24px; display: flex; flex-direction: column; gap: 18px; }
.switch { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); background: var(--tint); border-radius: 10px; padding: 4px; gap: 4px; }
.switch button { min-height: 44px; border: 0; border-radius: 8px; background: transparent; color: var(--indigo); font: 700 15px var(--text); cursor: pointer; }
.switch button[aria-pressed="true"] { background: var(--indigo); color: #fff; }
.dl { display: flex; flex-direction: column; gap: 6px; }
.main-file { text-decoration: none; background: var(--yellow); color: var(--indigo); border-radius: 10px; padding: 16px; display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.main-file:hover { color: var(--indigo); background: #FFD43B; }
.mf-text, .f-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mf-text b { font-size: 16px; }
.mf-text small { font-size: 13px; }
.dl-label { font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 0 0 6px; }
.file { text-decoration: none; color: var(--ink); display: flex; gap: 12px; align-items: center; padding: 10px 8px; border-radius: 8px; min-height: 44px; }
.file:hover { background: var(--ground); color: var(--ink); }
.file svg { color: var(--indigo-2); flex: none; }
.f-text b { font-size: 15px; font-weight: 600; line-height: 1.35; }
.f-text small { font-size: 13px; color: var(--muted); }
.zip { margin-top: 12px; min-height: 48px; border-radius: 10px; border: 2px solid var(--indigo); color: var(--indigo); font-weight: 700; font-size: 15px; text-decoration: none; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 12px; text-align: center; }
.zip:hover { background: var(--indigo); color: #fff; }
.dl p { margin: 8px 0 0; line-height: 1.5; }
.side-info { padding: 24px; font-size: 14px; }
.side-info h3 { margin: 0 0 4px; font-size: 16px; color: var(--indigo); }
.side-info p { margin: 0 0 12px; }
.side-info p:last-child { margin-bottom: 0; }

/* Footer */
.foot { background: var(--indigo); color: var(--on-dark); font-size: 14px; }
.foot-row { padding-top: 28px; padding-bottom: 28px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }

@media (max-width: 720px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .detail-side { position: static; order: -1; }
  .panel, .central { padding: 20px; }
  .ready { grid-template-columns: minmax(0, 1fr); }
  .ready-body, .ready-label { padding: 20px; }
  .hero-img { display: none; }
}
