/* Digital Bridge Accessibility Hackathon 2026, application site.
   Layout: one left-aligned 62ch reading column on white, a navy band for the three tracks,
   and an access toolbar that stays at the top and changes the page itself.
   Brand: Poppins (ALX house font), ink and navy for text, mint only for the one word and the one action. */

:root {
  --paper: #ffffff;
  --paper-2: #f2f5f8;
  --ink: #1b1e28;
  --navy: #0e2a4a;
  --mint: #05c96d;
  --mint-ink: #027a47;   /* mint dark enough for text on white, 5.4:1 (the old #04955a was only 3.85:1) */
  --on-navy: #ffffff;        /* text on a navy or ink fill */
  --on-mint-hover: #ffffff;  /* text on the mint-ink hover fill */
  --on-error: #ffffff;       /* text on an error fill */
  --muted: #4e5d6e;
  --line: rgba(14, 42, 74, 0.16);
  --focus: #ffb800;
  --band: var(--navy);
  --band-fg: #ffffff;
  --band-mint: #05f283;
  --error: #b42318;
  --ok: #04955a;
  --font: "Poppins", "Noto Sans Ethiopic", "Nyala", "Abyssinica SIL", system-ui, sans-serif;
  --step: 1rem;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-contrast="high"]) {
    --paper: #0b1b30;
    --paper-2: #12274a;
    --ink: #eef2f7;
    --navy: #eef2f7;
    --mint: #05f283;
    --mint-ink: #05f283;
    --muted: #b3c0d0;
    --line: rgba(238, 242, 247, 0.22);
    --band: #061325;
    --on-navy: #0b1b30;
    --on-mint-hover: #062a18;
    --on-error: #0b1b30;
    --error: #ff9b92;   /* 9:1 on the dark paper; #b42318 was 2.6:1 */
    color-scheme: dark;
  }
}
:root[data-theme="dark"]:not([data-contrast="high"]) {
  --paper: #0b1b30;
  --paper-2: #12274a;
  --ink: #eef2f7;
  --navy: #eef2f7;
  --mint: #05f283;
  --mint-ink: #05f283;
  --muted: #b3c0d0;
  --line: rgba(238, 242, 247, 0.22);
  --band: #061325;
  --on-navy: #0b1b30;
  --on-mint-hover: #062a18;
  --on-error: #0b1b30;
  --error: #ff9b92;
  color-scheme: dark;
}
/* High contrast: black on white, borders solid, mint replaced with a dark green that passes 7:1. */
:root[data-contrast="high"] {
  --paper: #ffffff;
  --paper-2: #ffffff;
  --ink: #000000;
  --navy: #000000;
  --mint: #006b3c;
  --mint-ink: #006b3c;
  --muted: #000000;
  --line: #000000;
  --band: #000000;
  --band-fg: #ffffff;
  --band-mint: #7dffb8;
  --focus: #ff00ff;
  color-scheme: light;
}
:root[data-size="125"] { font-size: 125%; }
:root[data-size="150"] { font-size: 150%; }

* { box-sizing: border-box; }
html { height: auto; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.125rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  font-synthesis: none;
  overflow-x: hidden;
}
:root[data-motion="off"], :root[data-motion="off"] *, :root[data-motion="off"] *::before, :root[data-motion="off"] *::after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
[hidden] { display: none !important; }

img { max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 0.08em; }
a:hover { color: var(--mint-ink); }
/* Two-tone ring: ink inside, amber (or magenta in high contrast) outside. One of the two always
   has 3:1 against the page, the navy band or a filled button; amber alone was 1.7:1 on white. */
:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 0;
  box-shadow: 0 0 0 6px var(--focus);
}
main:focus { outline: none; }
h1, h2, h3 { font-weight: 800; line-height: 1.1; letter-spacing: -0.015em; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(2.1rem, 4.8vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.25rem; line-height: 1.3; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding-left: 1.25em; }
li + li { margin-top: 0.4em; }
strong { font-weight: 600; }
.mint { color: var(--mint-ink); }

.skip {
  position: absolute; left: 16px; top: -100px;
  background: var(--navy); color: var(--on-navy); padding: 12px 16px; z-index: 50; font-weight: 600;
}
.skip:focus { top: 16px; }

/* ----- wrappers ----- */
.wrap {
  max-width: 68rem;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.col { max-width: 62ch; }
section { padding-block: clamp(3rem, 7vw, 6rem); }
section + section { border-top: 1px solid var(--line); }
.stack { display: flex; flex-direction: column; gap: var(--gap, 1.25rem); }
.stack > * { min-width: 0; }

/* ----- access toolbar ----- */
.access {
  position: static; z-index: 20;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
/* Sticky only when there is room. At 200% zoom or 320px the toolbar wraps to several rows and would
   cover the page (1.4.10, 2.4.11), so it scrolls away there. */
@media (min-width: 48rem) and (min-height: 36rem) {
  .access { position: sticky; top: env(safe-area-inset-top, 0px); }
  html { scroll-padding-top: 8rem; }
}
.access .wrap {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem;
  padding-block: 0.5rem;
}
.access p { font-size: 0.9rem; color: var(--muted); margin-right: auto; }
.access .btns { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tool {
  font: inherit; font-size: 0.95rem; font-weight: 600;
  min-height: 44px; min-width: 44px; padding: 0 0.9rem;
  background: var(--paper-2); color: var(--ink);
  border: 2px solid var(--muted); border-radius: 6px; cursor: pointer;   /* 3:1 or better, 1.4.11 */
  transition: transform 140ms ease-out, border-color 140ms ease-out;
}
.tool:hover { border-color: var(--navy); }
.tool:active { transform: scale(0.97); }
.tool[aria-pressed="true"] { background: var(--navy); color: var(--on-navy); border-color: var(--navy); }
/* a tick as well as the colour change, so the on state is not colour only (1.4.1) */
.tool[aria-pressed="true"]::before { content: "\2713\00a0"; content: "\2713\00a0" / ""; }

/* ----- header ----- */
header.top { padding-block: 1.25rem; border-bottom: 1px solid var(--line); }
header.top .wrap { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.logo img { height: 2.4rem; width: auto; display: block; }
:root[data-theme="dark"] .logo img, :root[data-contrast="high"] .logo img { background: #fff; padding: 6px 10px; border-radius: 4px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo img { background: #fff; padding: 6px 10px; border-radius: 4px; } }
nav.main { margin-left: auto; }
nav.main ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
nav.main li { margin: 0; }
nav.main a { text-decoration: none; font-weight: 500; padding: 0.6rem 0; display: inline-block; }
nav.main a:hover { text-decoration: underline; }

/* ----- buttons ----- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  min-height: 56px; padding: 0 1.6rem; border-radius: 8px;
  border: 2px solid var(--navy); background: var(--navy); color: var(--on-navy);
  transition: transform 140ms ease-out, background 140ms ease-out;
}
.btn:hover { background: var(--ink); border-color: var(--ink); color: var(--on-navy); }
.btn:active { transform: scale(0.97); }
.btn.mint { background: var(--mint); border-color: var(--mint); color: #062a18; }
.btn.mint:hover { background: var(--mint-ink); border-color: var(--mint-ink); color: var(--on-mint-hover); }
/* high contrast: dark green fill needs white text (dark text on it was 2.3:1) */
:root[data-contrast="high"] .btn.mint { color: #fff; }
:root[data-contrast="high"] .btn.mint:hover { background: #000; border-color: #000; color: #fff; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--navy); }
.btn.ghost:hover { background: var(--paper-2); color: var(--ink); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }

/* ----- hero ----- */
.hero { padding-block: clamp(3rem, 8vw, 7rem) clamp(2.5rem, 6vw, 5rem); }
.hero .wrap { display: grid; gap: 2.25rem; }
.hero .wrap > * { min-width: 0; }
.event { font-weight: 600; }
.hero h1 { max-width: 27ch; }
.hero .lede { font-size: clamp(1.15rem, 2vw, 1.35rem); max-width: 52ch; color: var(--muted); }
.hero .signed { font-size: 0.95rem; color: var(--muted); max-width: 62ch; }
.hero .am { font-size: 1.15rem; max-width: 50ch; line-height: 1.7; }
.cta { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.facts {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 1.25rem 1.5rem;
  border-top: 2px solid var(--ink); padding-top: 1.25rem;
}
.facts li { margin: 0; min-width: 0; }
.facts b { display: block; font-weight: 800; font-size: 1.45rem; line-height: 1.15; font-variant-numeric: tabular-nums; }
.facts span { color: var(--muted); font-size: 0.95rem; }

#am h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
#am .am { max-width: 62ch; line-height: 1.75; }

/* ----- quote from the co-design session ----- */
.voice { border-left: 6px solid var(--mint); padding-left: 1.25rem; }
.voice p { font-size: clamp(1.2rem, 2.4vw, 1.6rem); font-weight: 500; line-height: 1.35; }
.voice footer { margin-top: 0.75rem; color: var(--muted); font-size: 0.95rem; }

/* ----- tracks band ----- */
.tracks { background: var(--band); color: var(--band-fg); border-top: 0; }
.tracks h2, .tracks h3 { color: var(--band-fg); }
.tracks .mint { color: var(--band-mint); }
.tracks .intro { color: rgba(255,255,255,0.8); max-width: 60ch; }
:root[data-contrast="high"] .tracks .intro { color: #fff; }
.track-list { display: grid; gap: 0; margin-top: 2.5rem; }
.track {
  display: grid; grid-template-columns: 1fr; gap: 1.25rem 3rem;
  padding-block: 2rem; border-top: 1px solid rgba(255,255,255,0.25);
}
.track > * { min-width: 0; }
@media (min-width: 840px) { .track { grid-template-columns: 1fr 1.2fr; } }
.track .t-head h3 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.track .t-head .for { margin-top: 0.75rem; color: rgba(255,255,255,0.78); }
:root[data-contrast="high"] .track .t-head .for { color: #fff; }
.track .t-head .problem { margin-top: 1rem; }
.track dl { margin: 0; display: grid; gap: 1rem; }
.track dt { font-weight: 600; color: var(--band-mint); }
.track dd { margin: 0.25rem 0 0; }
.track ul { padding-left: 1.1em; }
.savanna {
  margin-top: 2.5rem; padding: 0.25rem 0 0.25rem 1.25rem; border-left: 6px solid var(--band-mint);
  display: grid; gap: 0.75rem; max-width: 62ch;
}
.savanna h3 { font-size: 1.3rem; }
.savanna p { color: rgba(255,255,255,0.88); }
:root[data-contrast="high"] .savanna p { color: #fff; }
/* ALX mark, white on the navy band only, top right of the band head. Clear space: one mark height on every side. Never on white, never recoloured. */
.band-head { display: grid; grid-template-columns: 1fr auto; align-items: start; gap: 1rem 3rem; }
.band-head h2 { max-width: 18ch; }
.alx-mark { height: 48px; width: auto; display: block; margin: 0.4rem 0 0 0; padding: 0 0 0 48px; }
@media (max-width: 600px) { .band-head { grid-template-columns: 1fr; gap: 1.5rem; } .alx-mark { order: -1; padding: 0; } }

/* ----- two routes (who can apply) ----- */
.routes { display: grid; gap: 2.5rem; margin-top: 2rem; }
@media (min-width: 760px) { .routes { grid-template-columns: 1fr 1fr; gap: 3rem; } }
.route { border-top: 2px solid var(--ink); padding-top: 1.25rem; display: grid; gap: 1rem; align-content: start; min-width: 0; }
.route h3 { font-size: 1.5rem; }
.route .btn { justify-self: start; }
.route ul { color: var(--ink); }

/* ----- timeline (a real sequence) ----- */
.timeline { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: 0; }
.timeline li { display: grid; grid-template-columns: 9rem 1fr; gap: 1rem; padding-block: 1rem; border-top: 1px solid var(--line); margin: 0; }
.timeline li > * { min-width: 0; }
.timeline li:last-child { border-bottom: 1px solid var(--line); }
.timeline time { font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.3; }
.timeline time small { display: block; font-weight: 500; color: var(--muted); font-size: 0.9rem; }
.timeline .now { color: var(--mint-ink); }
@media (max-width: 520px) { .timeline li { grid-template-columns: 1fr; gap: 0.25rem; } }

/* ----- judging ----- */
.gate { border-top: 4px solid var(--ink); padding-top: 1.25rem; display: grid; gap: 0.75rem; }
.weights { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 0.75rem; }
.weights li { display: grid; grid-template-columns: 3.25rem 1fr; gap: 0.75rem; align-items: baseline; margin: 0; }
.weights li > * { min-width: 0; }
.weights b { font-size: 1.6rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.weights .bar { height: 6px; background: var(--paper-2); border-radius: 3px; margin-top: 0.4rem; overflow: hidden; }
.weights .bar i { display: block; height: 100%; background: var(--mint); }
.weights small { color: var(--muted); display: block; }

/* ----- faq ----- */
details { border-top: 1px solid var(--line); }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 600; padding: 1rem 0; list-style: none; display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-weight: 800; font-size: 1.4rem; color: var(--mint-ink); flex: none; }
details[open] summary::after { content: "\2212"; }
details .body { padding-bottom: 1.25rem; max-width: 62ch; }

/* ----- schedule tables ----- */
.sched { display: grid; gap: 1rem; }
.tbl { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl table { border-collapse: collapse; width: 100%; min-width: 28rem; font-size: 1rem; }
.tbl th, .tbl td { text-align: left; vertical-align: top; padding: 0.75rem 1rem 0.75rem 0; border-top: 1px solid var(--line); }
.tbl thead th { font-weight: 600; color: var(--muted); border-top: 0; font-size: 0.9rem; }
.tbl tbody th { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tbl tbody tr:last-child th, .tbl tbody tr:last-child td { border-bottom: 1px solid var(--line); }

/* ----- ask the team ----- */
.qa { margin: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.qa dt { font-weight: 600; padding-top: 1rem; }
.qa dd { margin: 0.35rem 0 0; padding-bottom: 1rem; border-bottom: 1px solid var(--line); color: var(--muted); }

/* ----- footer ----- */
footer.site { border-top: 1px solid var(--line); padding-block: 2.5rem; color: var(--muted); font-size: 0.95rem; }
footer.site .wrap { display: grid; gap: 1rem; }
footer.site p { overflow-wrap: anywhere; }
footer.site .partners { font-weight: 500; color: var(--ink); }

/* ===== application form ===== */
.form-page { min-height: 70vh; }
.form-page .wrap { max-width: 44rem; }
.progress { display: flex; align-items: center; gap: 1rem; margin-bottom: 2rem; color: var(--muted); font-size: 0.95rem; }
.progress .bar { flex: 1; height: 6px; background: var(--paper-2); border-radius: 3px; overflow: hidden; }
.progress .bar i { display: block; height: 100%; width: 0; background: var(--mint); transition: width 220ms ease-out; }
.q { display: grid; gap: 1.25rem; }
.q > * { min-width: 0; }
.q h2 { overflow-wrap: anywhere; }
fieldset.field { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.field > legend { margin-bottom: 0.5rem; }
.q h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); }
.q .help { color: var(--muted); }
.field { display: grid; gap: 0.5rem; }
.field label, .field legend { font-weight: 600; padding: 0; }
.field .hint { font-size: 0.95rem; color: var(--muted); }
input[type="text"], input[type="email"], input[type="tel"], input[type="url"], textarea, select {
  font: inherit; width: 100%; min-height: 56px; padding: 0.75rem 1rem;
  border: 2px solid var(--ink); border-radius: 8px; background: var(--paper); color: var(--ink);
}
textarea { min-height: 9rem; resize: vertical; }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--error); border-width: 3px; }
.choices { display: grid; gap: 0.75rem; border: 0; padding: 0; margin: 0; }
.choice {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.9rem; align-items: start; overflow-wrap: anywhere;
  padding: 1rem 1.1rem; border: 2px solid var(--line); border-radius: 10px; cursor: pointer;
  transition: border-color 140ms ease-out, background 140ms ease-out;
}
.choice:hover { border-color: var(--navy); }
.choice:has(:checked) { border-color: var(--navy); background: var(--paper-2); }
.choice:has(:focus-visible) { outline: 3px solid var(--ink); outline-offset: 0; box-shadow: 0 0 0 6px var(--focus); }
.choice input:focus-visible { outline: none; box-shadow: none; }   /* the card carries the ring */
.choice input { width: 28px; height: 28px; margin: 0.15rem 0 0; accent-color: var(--mint-ink); flex: none; }
.choice b { font-weight: 600; display: block; }
.choice small { color: var(--muted); display: block; font-size: 0.95rem; margin-top: 0.2rem; }
.err { color: var(--error); font-weight: 600; font-size: 0.95rem; display: none; }
.err[data-show="1"] { display: block; }
.voice-row { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; }
.voice-row .tool { gap: 0.5rem; display: inline-flex; align-items: center; }
.voice-row .tool[aria-pressed="true"] { background: var(--error); border-color: var(--error); color: var(--on-error); }
.voice-row > input, .voice-row > textarea { flex: 1 1 12rem; min-width: 0; width: auto; }
.nav-row { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: space-between; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
@media (max-width: 30rem) { .nav-row .btn { flex: 1 1 100%; } }
.saved { font-size: 0.9rem; color: var(--muted); margin-top: 1rem; }
.review { display: grid; gap: 0; border-top: 1px solid var(--line); }
.review .row { padding: 0.9rem 0; border-bottom: 1px solid var(--line); }
.review .row dt { font-size: 0.9rem; color: var(--muted); overflow-wrap: anywhere; }
.review .row dd { margin: 0.15rem 0 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem; align-items: start; }
.review .row .val { font-weight: 500; white-space: pre-wrap; overflow-wrap: anywhere; }
.review .row button { font: inherit; font-weight: 600; background: none; border: 0; color: var(--mint-ink); text-decoration: underline; cursor: pointer; min-height: 44px; min-width: 44px; padding: 0 0.5rem; }
.done { display: grid; gap: 1.25rem; padding: 2rem; border: 3px solid var(--mint); border-radius: 12px; }
.done h2 { color: var(--mint-ink); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.hp { position: absolute; left: -9999px; }
.lang-switch { display: flex; flex-wrap: wrap; gap: 0.5rem; }
