/* YES AI Hub look: colours and fonts taken from aihubportal.yes4youth.co.za */
:root {
  --teal: #012B39;
  --ink: #172028;
  --text: #454E58;
  --muted: #6B7580;
  --page: #FAFCFE;
  --surface: #FFFFFF;
  --line: #E6ECF2;
  --orange: #F9A726;
  --orange-hover: #EE9A12;
  --accent: #934F00;
  --ok-bg: #E3F6EA;
  --ok: #1E6B3A;
  --warn-bg: #FFF1D6;
  --warn: #934F00;
  --bad-bg: #FDE8E8;
  --bad: #9B2C2C;
  --note-bg: #EEF2F6;
  --radius: 12px;
  --font-heading: "Montserrat", system-ui, sans-serif;
  --font-body: "Questrial", system-ui, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
}

h1, h2, h3 { font-family: var(--font-heading); color: var(--ink); line-height: 1.15; margin: 0 0 0.5rem; }
h1 { font-weight: 800; font-size: clamp(2.1rem, 6vw, 3.25rem); }
h2 { font-weight: 700; font-size: 1.4rem; }
h3 { font-weight: 600; font-size: 1.05rem; }
p { margin: 0 0 1rem; }
a { color: var(--accent); }
a:focus-visible, .btn:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }

.topbar {
  background: var(--teal);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem clamp(1rem, 4vw, 2.5rem);
}
.brand { display: flex; align-items: center; gap: 0.65rem; color: #FFFFFF; text-decoration: none; }
.brand strong { display: block; font-family: var(--font-heading); font-weight: 600; font-size: 0.95rem; }
.brand small { display: block; font-size: 0.75rem; color: #CFE6EE; }
.topnav { display: flex; align-items: center; gap: 1.25rem; }
.topnav a, .nav-button { color: #FFFFFF; text-decoration: none; font-family: var(--font-heading); font-weight: 500; font-size: 0.9rem; }
.inline-form { margin: 0; }
.nav-button { background: none; border: 0; padding: 0; cursor: pointer; }
.nav-button:hover, .topnav a:hover { text-decoration: underline; }

main { max-width: 1100px; margin: 0 auto; padding: clamp(1.75rem, 5vw, 4rem) clamp(1rem, 4vw, 2.5rem); }

.eyebrow {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.75rem;
}
.lead { font-size: 1.15rem; max-width: 42rem; }
.hero { margin-bottom: 2.5rem; }

.btn {
  display: inline-block;
  background: var(--orange);
  color: var(--ink);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.7rem 1.4rem;
  border: 0;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--orange-hover); }
.btn-quiet { background: transparent; box-shadow: inset 0 0 0 2px var(--orange); }
.btn-quiet:hover { background: var(--warn-bg); }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; margin: 0 0 3rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem 1.5rem; }

.steps { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.steps li { display: flex; gap: 0.9rem; align-items: flex-start; }
.step-num {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--orange);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
}

.pill { display: inline-block; font-family: var(--font-heading); font-weight: 500; font-size: 0.75rem; padding: 0.15rem 0.6rem; border-radius: 999px; white-space: nowrap; }
.pill-ok { background: var(--ok-bg); color: var(--ok); }
.pill-warn { background: var(--warn-bg); color: var(--warn); }
.pill-bad { background: var(--bad-bg); color: var(--bad); }
.pill-note { background: var(--note-bg); color: var(--text); }

.footer { border-top: 1px solid var(--line); padding: 1.25rem clamp(1rem, 4vw, 2.5rem); font-size: 0.85rem; color: var(--muted); text-align: center; }

section { margin-bottom: 2.5rem; }
.note { font-size: 0.9rem; color: var(--muted); max-width: 46rem; }

/* Evidence sources, strongest first */
.src-checked { background: var(--ok-bg); color: var(--ok); }
.src-document { background: #E6F1FB; color: #185FA5; }
.src-recorded { background: #EEEDFE; color: #534AB7; }
.src-declared { background: var(--note-bg); color: var(--text); }
.src-none { background: var(--bad-bg); color: var(--bad); }

.strength { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.75rem; margin: 1rem 0; }
.strength-card { border-radius: var(--radius); padding: 0.9rem 1rem; display: flex; flex-direction: column; gap: 0.15rem; font-size: 0.9rem; background: var(--surface); border: 1px solid var(--line); }
.strength-card.src-checked, .strength-card.src-document, .strength-card.src-recorded, .strength-card.src-declared, .strength-card.src-none { border-color: transparent; }
.strength-num { font-family: var(--font-heading); font-weight: 800; font-size: 1.6rem; line-height: 1.1; }

.findings { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.6rem; }
.findings li { display: flex; gap: 0.75rem; align-items: baseline; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.75rem 1rem; }

.evidence { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-size: 0.95rem; }
.evidence th { text-align: left; font-family: var(--font-heading); font-weight: 600; font-size: 0.8rem; color: var(--muted); padding: 0.7rem 1rem; border-bottom: 1px solid var(--line); }
.evidence td { padding: 0.7rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.evidence tr:last-child td { border-bottom: 0; }
.evidence small { display: block; color: var(--muted); margin-top: 0.3rem; }

/* Forms */
.narrow { max-width: 34rem; }
.form { display: grid; gap: 1.1rem; margin-top: 1.5rem; }
.field { display: grid; gap: 0.35rem; }
.field label, .field legend { font-family: var(--font-heading); font-weight: 600; font-size: 0.95rem; color: var(--ink); }
.field fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 0.35rem; }
.field input[type=text], .field input[type=email], .field input[type=tel], .field input[type=password], .field select, .field textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid #C9D4DE;
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
}
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--orange); outline-offset: 1px; border-color: var(--ink); }
.hint { margin: 0; font-size: 0.85rem; color: var(--muted); }
.error { margin: 0; font-size: 0.85rem; color: var(--bad); }
.has-error input, .has-error select, .has-error textarea { border-color: var(--bad); }
.error-box { background: var(--bad-bg); color: var(--bad); border-radius: 10px; padding: 0.75rem 1rem; }
.choices { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice span { display: inline-block; padding: 0.55rem 1.2rem; border: 1.5px solid #C9D4DE; border-radius: 999px; font-family: var(--font-heading); font-weight: 600; font-size: 0.9rem; background: var(--surface); }
.choice input:checked + span { background: var(--orange); border-color: var(--orange); color: var(--ink); }
.choice input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 2px; }
.form-actions { display: flex; align-items: center; gap: 1.25rem; margin-top: 0.5rem; }
.back { font-family: var(--font-heading); font-weight: 600; font-size: 0.9rem; }

.progress { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; margin: 0.5rem 0 1.5rem; }
.progress div { height: 100%; background: var(--orange); border-radius: 999px; }

/* Dashboard */
.dash { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; margin-bottom: 2.5rem; }
.score { margin: 0; font-family: var(--font-heading); font-weight: 800; font-size: 1.5rem; color: var(--ink); }
.score span { font-size: 3.2rem; line-height: 1; }
.parts, .tasks { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.2rem; }
.parts li, .tasks li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.6rem 0; border-top: 1px solid var(--line); }
.parts small { display: block; color: var(--muted); font-size: 0.85rem; }
.part-score { font-family: var(--font-heading); font-weight: 700; color: var(--ink); white-space: nowrap; }
.btn-small { padding: 0.4rem 0.9rem; font-size: 0.85rem; white-space: nowrap; }

@media (max-width: 640px) {
  .topnav { gap: 0.9rem; }
  .brand small { display: none; }
  .evidence thead { display: none; }
  .evidence, .evidence tbody, .evidence tr, .evidence td { display: block; width: 100%; }
  .evidence tr { border-bottom: 1px solid var(--line); padding: 0.5rem 0; }
  .evidence td { border: 0; padding: 0.3rem 1rem; }
  .evidence td::before { content: attr(data-label); display: block; font-family: var(--font-heading); font-weight: 600; font-size: 0.75rem; color: var(--muted); }
  .findings li { flex-direction: column; gap: 0.4rem; }
}
