/* Shared look of the FAP Tracker on DHIS2 pages. Colours are the app's own
   (lib/ui/common/brand.dart). System fonts only, so the pages load nothing
   from other sites. */
:root {
  --blue50: #f1f9ff;
  --blue100: #e2f2ff;
  --blue200: #badfff;
  --blue500: #007deb;
  --blue700: #1260ba;
  --blue900: #0a2e52;
  --red100: #fff1f0;
  --red700: #ba1f19;
  --green700: #1a7a3a;
  --ink: #1c2833;
  --muted: #4a5a6a;
  --line: #d5dde5;
  --radius: 14px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: #fff;
}

a { color: var(--blue700); }
a:hover { color: var(--blue900); }

.wrap { max-width: 960px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }

/* Header */
.site-header { background: var(--blue500); color: #fff; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 14px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; font-size: 18px; }
.brand:hover { color: #fff; }
.brand img { width: 34px; height: 34px; }
.site-nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-nav a { color: #fff; text-decoration: none; font-size: 15px; opacity: 0.92; }
.site-nav a:hover, .site-nav a[aria-current="page"] { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }

/* Page title band */
.page-title { background: var(--blue50); border-bottom: 1px solid var(--blue100); padding: 40px 0 32px; }
.page-title h1 { margin: 0 0 6px; font-size: 34px; line-height: 1.2; color: var(--blue900); }
.page-title p { margin: 0; color: var(--muted); }

main { padding: 32px 0 56px; }
main h2 { font-size: 24px; color: var(--blue900); margin: 40px 0 12px; line-height: 1.3; }
main h3 { font-size: 19px; color: var(--blue900); margin: 24px 0 8px; }
main ul { padding-left: 22px; }
main li { margin: 6px 0; }

.note { background: var(--blue50); border: 1px solid var(--blue100); border-radius: var(--radius); padding: 16px 20px; margin: 20px 0; }
.warn { background: var(--red100); border: 1px solid #f5c6c3; border-radius: var(--radius); padding: 16px 20px; margin: 20px 0; }
.warn strong { color: var(--red700); }

.toc { columns: 2; column-gap: 32px; padding-left: 20px; }
@media (max-width: 640px) { .toc { columns: 1; } }

/* Home page */
.hero { background: linear-gradient(160deg, var(--blue500), var(--blue700)); color: #fff; padding: 56px 0 64px; }
.hero .wrap { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 40px; align-items: center; }
.hero h1 { font-size: 42px; line-height: 1.15; margin: 0 0 14px; }
.hero .lead { font-size: 20px; margin: 0 0 14px; }
.hero p { color: #eaf4ff; }
.hero img { width: 100%; max-width: 300px; border-radius: 28px; box-shadow: 0 18px 40px rgba(10, 46, 82, 0.35); justify-self: center; }
.buttons { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.button { display: inline-block; padding: 12px 22px; border-radius: 999px; font-weight: 600; text-decoration: none; border: 2px solid transparent; font-size: 16px; cursor: pointer; }
.button.light { background: #fff; color: var(--blue700); }
.button.outline { border-color: #fff; color: #fff; }
.button.primary { background: var(--blue500); color: #fff; }
.button.primary:hover { background: var(--blue700); color: #fff; }
.button.light:hover { color: var(--blue900); }
.button.outline:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.soon { margin-top: 14px; font-size: 15px; color: #d6ebff; }
@media (max-width: 760px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero h1 { font-size: 34px; }
}

.section-intro { color: var(--muted); max-width: 680px; }
.features { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; margin-top: 20px; }
.feature { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; background: #fff; }
.feature h3 { margin: 0 0 6px; font-size: 18px; }
.feature p { margin: 0; color: var(--muted); font-size: 16px; }

.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 18px; margin-top: 20px; }
.shots figure { margin: 0; }
.shots img { width: 100%; border-radius: 18px; border: 1px solid var(--line); }
.shots figcaption { font-size: 14px; color: var(--muted); margin-top: 6px; text-align: center; }

.steps { counter-reset: step; list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
.steps li { counter-increment: step; border-radius: var(--radius); background: var(--blue50); padding: 18px 18px 18px 60px; position: relative; margin: 0; }
.steps li::before { content: counter(step); position: absolute; left: 18px; top: 16px; width: 30px; height: 30px; border-radius: 50%; background: var(--blue500); color: #fff; font-weight: 700; text-align: center; line-height: 30px; }

/* Questions */
details { border: 1px solid var(--line); border-radius: 12px; padding: 12px 18px; margin: 10px 0; }
details[open] { background: var(--blue50); border-color: var(--blue100); }
summary { cursor: pointer; font-weight: 600; color: var(--blue900); }
details p { margin: 10px 0 4px; }

/* Forms */
form { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-top: 16px; }
label { display: block; font-weight: 600; margin: 14px 0 6px; }
label.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
label.check input { margin-top: 6px; }
input[type="text"], input[type="email"], input[type="url"], textarea, select {
  width: 100%; padding: 11px 13px; font: inherit; font-size: 16px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink);
}
textarea { min-height: 120px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: 3px solid var(--blue200); border-color: var(--blue500); }
.hint { font-size: 14px; color: var(--muted); margin: 4px 0 0; }
.form-actions { margin-top: 20px; }
.form-done { display: none; margin-top: 16px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: #f7f9fb; padding: 28px 0; font-size: 15px; color: var(--muted); }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.site-footer nav { display: flex; gap: 16px; flex-wrap: wrap; }
.site-footer p { margin: 4px 0; }
