/* educateIndonesia.org: palette drawn from Indonesian school uniforms
   (SD red and white, SMP navy, SMA grey) */
:root {
  --red: #a4161a;
  --red-dark: #7f1013;
  --navy: #1e3a5f;
  --navy-deep: #152a45;
  --navy-tint: #e9eef5;
  --grey: #6b7480;
  --rule: #d5dbe3;
  --ink: #1c2430;
  --paper: #ffffff;
  --head: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --body: "Literata", Georgia, "Times New Roman", serif;
  --wrap: 1120px;
  --measure: 40rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.125rem;
  line-height: 1.7;
  font-optical-sizing: auto;
  /* thin red band: the red-over-white of the elementary uniform */
  border-top: 6px solid var(--red);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--red); }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(1rem, 4vw, 2rem); }
.skip { position: absolute; left: -999px; top: 0; background: var(--navy); color: #fff; padding: .5rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; top: 1rem; }

/* ---------- header ---------- */
.site-header { background: var(--paper); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1rem; }
.brand { display: flex; align-items: center; gap: 1rem; text-decoration: none; color: var(--ink); }
.brand img { width: 120px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-family: var(--head); font-weight: 700; font-stretch: 85%; font-size: 1.2rem; color: var(--navy); }
.brand-sub { font-family: var(--body); font-style: italic; font-size: .95rem; color: var(--grey); }
.actions { display: flex; align-items: center; gap: .75rem; }

.btn {
  display: inline-block; font-family: var(--head); font-weight: 650; font-size: 1rem; font-stretch: 90%;
  line-height: 1.2; padding: .75rem 1.25rem; border-radius: 6px; text-decoration: none; border: 2px solid transparent;
}
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-dark); color: #fff; }
.btn-line { border-color: var(--navy); color: var(--navy); background: transparent; }
.btn-line:hover { background: var(--navy); color: #fff; }

.menu-btn {
  display: none; font: 650 1rem/1 var(--head); font-stretch: 90%; color: var(--navy); background: none;
  border: 2px solid var(--navy); border-radius: 6px; padding: .7rem 1rem; cursor: pointer;
}

.site-nav { background: var(--navy); }
.site-nav ul { list-style: none; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 0 .25rem; }
.site-nav a {
  display: block; padding: .85rem .8rem; color: #fff; text-decoration: none;
  font-family: var(--head); font-weight: 550; font-stretch: 88%; font-size: 1rem; line-height: 1.2;
  border-bottom: 4px solid transparent;
}
.site-nav a:hover { background: var(--navy-deep); color: #fff; }
.site-nav a[aria-current="page"] { border-bottom-color: #fff; font-weight: 700; }
.site-nav .nav-form { display: none; }
.form-link { font-family: var(--head); font-weight: 600; font-stretch: 90%; font-size: 1rem; margin-right: .5rem; }

/* ---------- main ---------- */
main { padding-block: clamp(2rem, 5vw, 3.5rem) 4rem; }
h1, h2 { font-family: var(--head); color: var(--navy); margin: 0; text-wrap: balance; }
h1 { font-weight: 800; font-stretch: 75%; font-size: clamp(2.4rem, 6vw, 3.75rem); line-height: 1.02; letter-spacing: -.01em; }
h2 { font-weight: 700; font-stretch: 85%; font-size: 1.6rem; line-height: 1.2; margin: 2.5rem 0 .75rem; }
.page-head { max-width: var(--measure); margin-bottom: 2rem; padding-bottom: 1.25rem; border-bottom: 2px solid var(--rule); }
.prose { max-width: var(--measure); }
.prose p { margin: 0 0 1.1rem; }
.prose > h2:first-child { margin-top: 0; }

/* home hero: the slogan carries the page */
.hero h1 { font-size: clamp(2.6rem, 7.5vw, 5.25rem); max-width: 15ch; line-height: .98; }
.hero { margin-bottom: clamp(1.75rem, 4vw, 2.75rem); }
.home .prose { margin-block: 2.5rem; }

/* photo strips */
.strip { margin: 2.5rem 0; }
.home .strip:first-of-type { margin-top: 0; }
.strip-scroll { border-radius: 8px; overflow: hidden; background: var(--navy-tint); }
.strip img { width: 100%; }
@media (max-width: 640px) {
  .strip { margin-inline: calc(-1 * clamp(1rem, 4vw, 2rem)); }
  .strip-scroll { overflow-x: auto; border-radius: 0; scrollbar-width: thin; }
  .strip img { width: auto; height: 190px; max-width: none; }
}

.map { margin: 2rem 0 2.5rem; max-width: 760px; }
.map img { border-radius: 8px; border: 1px solid var(--rule); }

/* give panel */
.give {
  margin-top: 3rem; padding: clamp(1.5rem, 4vw, 2.25rem); background: var(--navy-tint);
  border-left: 6px solid var(--red); border-radius: 0 8px 8px 0; max-width: 52rem;
}
.give h2 { margin-top: 0; }
.give p { margin: 0 0 1.25rem; max-width: 38rem; }
.give .give-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 0; }

/* about */
.mission { font-size: 1.3rem; line-height: 1.55; color: var(--navy); }
.values { padding: 0; margin: 0; list-style: none; }
.values li { padding: .9rem 0 .9rem 1.5rem; border-top: 1px solid var(--rule); position: relative; }
.values li:last-child { border-bottom: 1px solid var(--rule); }
.values li::before { content: ""; position: absolute; left: 0; top: 1.55rem; width: .55rem; height: .55rem; background: var(--red); border-radius: 50%; }

/* scholarship */
blockquote { margin: 2rem 0; padding: 0 0 0 1.5rem; border-left: 4px solid var(--navy); }
blockquote p { font-size: 1.25rem; line-height: 1.55; font-style: italic; margin: 0 0 .5rem !important; }
cite { font-family: var(--head); font-style: normal; font-weight: 600; font-stretch: 90%; color: var(--grey); }
cite::before { content: "– "; }
.two-sides { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1.25rem; }
.two-sides > div { border-top: 4px solid var(--navy); padding-top: .75rem; }
.two-sides > div + div { border-top-color: var(--red); }
.two-sides h2 { margin: 0 0 .25rem; font-size: 1.3rem; }
.two-sides p { margin: 0 !important; }

/* newsletter + documents */
.editions, .docs { list-style: none; padding: 0; margin: 2rem 0 0; max-width: 46rem; }
.ed, .docs li {
  display: grid; grid-template-columns: 5rem 1fr auto; gap: 1rem; align-items: baseline;
  padding: .85rem 0; border-top: 1px solid var(--rule);
}
.docs li { grid-template-columns: 1fr auto; }
.editions li:last-child, .docs li:last-child { border-bottom: 1px solid var(--rule); }
.ed-no { font-family: var(--head); font-weight: 700; font-stretch: 80%; color: var(--grey); }
.ed-name { font-weight: 500; }
.ed-meta { font-family: var(--head); font-stretch: 90%; font-size: .9rem; color: var(--grey); white-space: nowrap; }
.ed-soon .ed-no { color: var(--red); }
.ed-soon .ed-name { color: var(--grey); font-style: italic; }

/* contact */
.contact { margin: 0; max-width: 40rem; }
.contact > div { display: grid; grid-template-columns: 13rem 1fr; gap: 1rem; padding: 1.1rem 0; border-top: 1px solid var(--rule); }
.contact > div:first-child { border-top: 0; }
.contact > div:last-child { border-bottom: 1px solid var(--rule); }
.contact dt { font-family: var(--head); font-weight: 700; font-stretch: 88%; color: var(--navy); }
.contact dd { margin: 0; }

/* chart */
.chart { margin: 2rem 0 0; max-width: 960px; }
.chart figcaption { display: flex; flex-direction: column; margin-bottom: .75rem; }
.chart-name { font-family: var(--head); font-weight: 700; font-stretch: 85%; font-size: 1.3rem; color: var(--navy); }
.chart-note { font-size: .95rem; color: var(--grey); }
.chart-box { position: relative; overflow-x: auto; }
.chart-svg { width: 100%; min-width: 560px; height: auto; display: block; font-family: var(--head); }
.chart-svg .grid { stroke: #e6eaf0; stroke-width: 1; }
.chart-svg .axis { stroke: #9aa3ae; stroke-width: 1; }
.chart-svg .tick { fill: var(--grey); font-size: 13px; font-stretch: 90%; }
.chart-svg .val { fill: var(--ink); font-size: 14px; font-weight: 700; }
.chart-svg .bar path { fill: var(--navy); transition: fill .15s; }
.chart-svg .bar .hit { fill: transparent; }
.chart-svg .bar:hover path, .chart-svg .bar:focus path { fill: var(--red); }
.chart-svg .bar:focus { outline: none; }
.tip {
  position: absolute; pointer-events: none; background: var(--ink); color: #fff; font: 600 .9rem/1.3 var(--head);
  padding: .4rem .6rem; border-radius: 4px; white-space: nowrap; transform: translate(-50%, -100%);
}
.chart-table { margin-top: 1rem; font-size: 1rem; }
.chart-table summary { cursor: pointer; color: var(--navy); font-family: var(--head); font-weight: 600; font-stretch: 90%; }
.chart-table table { border-collapse: collapse; margin-top: .75rem; min-width: 16rem; }
.chart-table th, .chart-table td { text-align: left; padding: .3rem 1.5rem .3rem 0; border-bottom: 1px solid var(--rule); }
.chart-table td + td, .chart-table th + th { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- footer ---------- */
.site-footer { background: var(--navy); color: #dfe6ef; font-size: 1rem; padding-top: 2.5rem; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: #ffd7d8; }
.site-footer p { margin: 0 0 .6rem; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.foot-title { font-family: var(--head); font-weight: 700; font-stretch: 88%; color: #fff; font-size: 1.05rem; }
.copy { border-top: 1px solid rgba(255,255,255,.18); margin-top: 1.5rem; padding-block: 1rem 1.5rem; font-size: .9rem; color: #b9c6d6; }

/* ---------- small screens ---------- */
@media (max-width: 860px) {
  .brand-sub { display: none; }
  .js .menu-btn { display: inline-block; }
  .js .site-nav { display: none; }
  .js .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; padding-block: .5rem; }
  .site-nav a { border-bottom: 0; border-left: 4px solid transparent; padding-left: .9rem; }
  .site-nav a[aria-current="page"] { border-left-color: #fff; }
  .site-nav .nav-form { display: block; }
  .form-link { display: none; }
  .foot-grid { grid-template-columns: 1fr; gap: 1.25rem; }
}
@media (max-width: 560px) {
  body { font-size: 1.0625rem; }
  .brand img { width: 92px; }
  .brand-name { font-size: 1rem; }
  .bar .btn-red { padding: .65rem .8rem; font-size: .95rem; }
  .menu-btn { padding: .6rem .75rem; }
  .brand-text { display: none; }
  .two-sides { grid-template-columns: 1fr; }
  .contact > div { grid-template-columns: 1fr; gap: .25rem; }
  .ed { grid-template-columns: 3.75rem 1fr; }
  .ed .ed-meta { grid-column: 2; }
  .docs li { grid-template-columns: 1fr; gap: .2rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media print { .site-nav, .actions, .give-actions { display: none; } body { border-top: 0; } }
