/* Christians Drive for Life Liverpool NSW â€” shared stylesheet
   Typefaces: Figtree (headings) + Atkinson Hyperlegible Next (body)
   Atkinson Hyperlegible was designed by the Braille Institute for maximum
   character distinction (I/l/1, O/0, b/d), which suits a plain-language,
   accessibility-first community resource. */

:root {
  /* shared neutrals */
  --ink: #1f1d1b;
  --ink-soft: #4a4642;
  --line: #ddd6cc;
  --paper: #fbf8f3;
  --card: #ffffff;
  --focus: #1a56db;

  /* page-level tokens (overridden per page theme) */
  --bg: var(--paper);
  --accent: #a3302a;
  --accent-ink: #ffffff;
  --accent-soft: #f6e4e1;
  --tint: #f3ede4;

  /* fact-type tokens (consistent site-wide) */
  --program: #7a2e1f;
  --program-bg: #fbeee9;
  --nsw: #1d3557;
  --nsw-bg: #e9eef5;
  --general: #3f5a4a;
  --general-bg: #eaf1ec;
  --flag: #7a5200;
  --flag-bg: #fff4dc;

  --radius: 12px;
  --radius-sm: 8px;
  --measure: 68ch;
  --gutter: clamp(16px, 4vw, 40px);
  --space-1: .5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;

  --font-body: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ---------- page design languages ---------- */
.theme-home       { --bg:#fbf8f3; --accent:#a3302a; --accent-soft:#f6e4e1; --tint:#f3ede4; }
.theme-about      { --bg:#fbf6ec; --accent:#6d1f33; --accent-soft:#f3e3e7; --tint:#f4ecdc; --measure:620px; }
.theme-access     { --bg:#f4f6f2; --accent:#3d5a47; --accent-soft:#e1ebe3; --tint:#e9eee7; }
.theme-mentoring  { --bg:#f9f6f1; --accent:#1f4e8c; --accent-soft:#e2eaf6; --tint:#efe9df; }
.theme-supervised { --bg:#f3f5f8; --accent:#3a5373; --accent-soft:#e1e7ef; --tint:#e8ecf2; --amber:#b86e00; }
.theme-experience { --bg:#f5f6f5; --accent:#1f6b6b; --accent-soft:#dff0ee; --tint:#ebecea; }
.theme-licence    { --bg:#f6f7fa; --accent:#1b2a4a; --accent-soft:#e3e7f0; --tint:#eceef4; --amber:#a86400; }
.theme-safe       { --bg:#fcf9f2; --accent:#48684f; --accent-soft:#e4ede4; --tint:#f3eee2; }
.theme-local      { --bg:#faf7f4; --accent:#9c4221; --accent-soft:#f6e5dc; --tint:#efe8e1; }
.theme-enquire    { --bg:#f8f7f4; --accent:#3b3f8f; --accent-soft:#e6e7f6; --tint:#eeece6; }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 1rem; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-wrap: break-word;
}
img, svg { max-width: 100%; height: auto; }
h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: 1.2;
  letter-spacing: -0.012em;
  color: var(--ink);
  margin: 0 0 .6em;
  text-wrap: balance;
}
h1 { font-size: clamp(2rem, 1.4rem + 3vw, 3.25rem); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.45rem, 1.2rem + 1.2vw, 2rem); font-weight: 750; margin-top: 0; }
h3 { font-size: 1.2rem; font-weight: 700; }
p, ul, ol, dl, table { margin: 0 0 1rem; }
p { text-wrap: pretty; }
ul, ol { padding-left: 1.25rem; }
li + li { margin-top: .35rem; }
strong { font-weight: 700; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
dd { margin: 0 0 .75rem; }
dt { margin-bottom: .1rem; }
abbr[title] { text-decoration: underline dotted; }

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 1rem; }

.wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 var(--gutter); }
.prose { max-width: var(--measure); }
/* narrow reading column that keeps the same left edge as full-width sections */
.wrap.prose { max-width: calc(var(--measure) + 2 * var(--gutter)); margin-left: max(0px, calc((100% - 1140px) / 2)); }
.lead { font-size: 1.2rem; line-height: 1.6; color: var(--ink-soft); }
.muted { color: var(--ink-soft); }
.small { font-size: .92rem; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- header / nav ---------- */
.site-header { background: var(--card); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: .85rem; padding-bottom: .85rem; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--ink); }
.brand-mark {
  flex: none; width: 40px; height: 40px; border-radius: 10px;
  background: var(--accent); color: #fff; display: grid; place-items: center;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; font-family: var(--font-head); }
.brand-name { font-weight: 800; font-size: 1.02rem; }
.brand-place { font-size: .82rem; color: var(--ink-soft); font-weight: 600; letter-spacing: .02em; }

.nav-toggle {
  display: none; font: inherit; font-weight: 700; font-size: .95rem;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  border-radius: var(--radius-sm); padding: .55rem .9rem; cursor: pointer; min-height: 44px;
}
.site-nav { border-top: 1px solid var(--line); background: var(--card); }
.site-nav ul { list-style: none; margin: 0 auto; padding: .35rem var(--gutter); display: flex; flex-wrap: wrap; gap: .15rem 0; }
.site-nav li + li { margin-top: 0; }
.site-nav a {
  display: block; padding: .45rem .55rem; border-radius: var(--radius-sm);
  color: var(--ink); text-decoration: none; font-size: .9rem; font-weight: 600; white-space: nowrap;
}
.site-nav a:hover { background: var(--tint); }
.site-nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }

/* progressive enhancement: nav is visible without JS; JS adds .js and collapses it on small screens */
@media (max-width: 1080px) {
  .js .nav-toggle { display: inline-block; }
  .js .site-nav[data-open="false"] { display: none; }
  .site-nav ul { flex-direction: column; padding: .5rem var(--gutter) 1rem; }
  .site-nav a { padding: .7rem .5rem; font-size: 1rem; }
}

/* ---------- breadcrumb ---------- */
.breadcrumb { font-size: .9rem; padding-top: 1.25rem; }
.breadcrumb ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .35rem; }
.breadcrumb li + li { margin-top: 0; }
.breadcrumb li + li::before { content: "/"; margin-right: .35rem; color: var(--ink-soft); }
.breadcrumb a { color: var(--ink-soft); }

/* ---------- hero ---------- */
.hero { padding: var(--space-4) 0 var(--space-4); }
.eyebrow {
  display: inline-block; font-family: var(--font-head); font-weight: 700; font-size: .82rem;
  letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: .75rem;
}
.hero .lead { max-width: 62ch; }
.hero-grid { display: grid; gap: var(--space-4); align-items: start; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.35fr 1fr; } }

/* ---------- photos (AI-generated illustrations, always captioned) ---------- */
.page-photo { margin-bottom: var(--space-4); }
.photo { margin: var(--space-3) 0 0; max-width: var(--measure); }
.photo img { display: block; width: 100%; height: auto; border-radius: var(--radius); background: var(--tint); }
.photo figcaption { font-size: .85rem; color: var(--ink-soft); margin-top: .5rem; }
.photo--wide { margin: 0; max-width: none; }
.photo--wide img { aspect-ratio: 4 / 3; object-fit: cover; }
@media (min-width: 720px) { .photo--wide img { aspect-ratio: 2 / 1; } }
@media (min-width: 1000px) { .photo--wide img { aspect-ratio: 5 / 2; } }

/* ---------- sections ---------- */
.section { padding: var(--space-4) 0; }
.section + .section { border-top: 1px solid var(--line); }
.section--tint { background: var(--tint); border-top: 0 !important; }
.section--tint + .section { border-top: 0; }
.section-head { max-width: var(--measure); margin-bottom: var(--space-3); }
.answer { font-size: 1.12rem; font-weight: 500; }
.answer::first-line { font-weight: 700; }

/* ---------- cards / grids ---------- */
.grid { display: grid; gap: 1rem; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 640px) and (max-width: 959px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.25rem 1.25rem 1.1rem;
}
.card h3 { margin-bottom: .4rem; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.card--accent { border-top: 4px solid var(--accent); }
.card--soft { background: var(--accent-soft); border-color: transparent; }

.link-card { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); height: 100%; transition: border-color .15s, transform .15s; }
.link-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.link-card .go { margin-top: auto; padding-top: .6rem; color: var(--accent); font-weight: 700; font-family: var(--font-head); font-size: .95rem; }
.link-card .num { font-family: var(--font-head); font-weight: 800; color: var(--accent); font-size: .85rem; letter-spacing: .06em; }

/* ---------- fact labels: program / NSW / general / flag ---------- */
.fact { border-radius: var(--radius); padding: 1rem 1.15rem; border-left: 5px solid; margin: 0 0 1.25rem; }
.fact > :last-child { margin-bottom: 0; }
.fact-label {
  display: inline-flex; align-items: center; gap: .4rem;
  font-family: var(--font-head); font-weight: 800; font-size: .76rem; letter-spacing: .07em; text-transform: uppercase;
  margin-bottom: .35rem;
}
.fact--program { background: var(--program-bg); border-color: var(--program); }
.fact--program .fact-label { color: var(--program); }
.fact--nsw { background: var(--nsw-bg); border-color: var(--nsw); }
.fact--nsw .fact-label { color: var(--nsw); }
.fact--general { background: var(--general-bg); border-color: var(--general); }
.fact--general .fact-label { color: var(--general); }
.fact--flag { background: var(--flag-bg); border-color: var(--flag); }
.fact--flag .fact-label { color: var(--flag); }
.fact .src { font-size: .88rem; color: var(--ink-soft); margin-top: .5rem; }

.legend { display: flex; flex-wrap: wrap; gap: .5rem 1rem; font-size: .88rem; margin: 0 0 1.5rem; padding: 0; list-style: none; }
.legend li { display: flex; align-items: center; gap: .45rem; margin: 0; }
.legend .dot { width: 12px; height: 12px; border-radius: 3px; flex: none; }

/* ---------- pathway / timeline ---------- */
.pathway { list-style: none; padding: 0; margin: 0 0 1rem; counter-reset: step; display: grid; gap: .75rem; }
.pathway li { margin: 0; position: relative; padding: 1rem 1rem 1rem 3.6rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); counter-increment: step; }
.pathway li::before {
  content: counter(step); position: absolute; left: 1rem; top: 1rem;
  width: 1.9rem; height: 1.9rem; border-radius: 50%;
  background: var(--accent); color: #fff; font-family: var(--font-head); font-weight: 800; font-size: .95rem;
  display: grid; place-items: center;
}
.pathway strong { display: block; font-family: var(--font-head); }
@media (min-width: 900px) {
  .pathway--row { grid-template-columns: repeat(var(--steps, 5), 1fr); }
  .pathway--row li { padding: 3.4rem 1rem 1rem; }
  .pathway--row li::before { top: 1rem; }
}

.chain { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; list-style: none; padding: 0; margin: 0 0 1rem; }
.chain li { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: .35rem .85rem; font-weight: 700; font-family: var(--font-head); font-size: .92rem; }
.chain li:not(:last-child)::after { content: "â†’"; margin-left: .6rem; color: var(--accent); }
.chain li:first-child { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ---------- comparison / tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); margin-bottom: 1.25rem; }
table { border-collapse: collapse; width: 100%; font-size: .96rem; margin: 0; }
caption { text-align: left; padding: .9rem 1rem 0; font-weight: 700; font-family: var(--font-head); }
th, td { text-align: left; vertical-align: top; padding: .75rem 1rem; border-bottom: 1px solid var(--line); }
thead th { background: var(--tint); font-family: var(--font-head); font-size: .9rem; }
tbody tr:last-child > * { border-bottom: 0; }
tbody th { font-family: var(--font-head); font-weight: 700; }

/* stacked tables on phones */
@media (max-width: 640px) {
  .table-stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table-stack tr { display: block; border-bottom: 1px solid var(--line); padding: .5rem 0; }
  .table-stack tbody tr:last-child { border-bottom: 0; }
  .table-stack th, .table-stack td { display: block; border: 0; padding: .3rem 1rem; }
  .table-stack td[data-label]::before { content: attr(data-label); display: block; font-weight: 700; font-size: .8rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .05em; }
}

.is-isnt { display: grid; gap: 1rem; }
@media (min-width: 720px) { .is-isnt { grid-template-columns: 1fr 1fr; } }
.is-isnt ul { list-style: none; padding: 0; }
.is-isnt li { padding-left: 1.7rem; position: relative; }
.is-isnt .is li::before { content: "âœ“"; position: absolute; left: 0; color: var(--general); font-weight: 800; }
.is-isnt .isnt li::before { content: "âœ•"; position: absolute; left: 0; color: var(--program); font-weight: 800; }

/* ---------- checklist ---------- */
.checklist { list-style: none; padding: 0; }
.checklist li { position: relative; padding-left: 2rem; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .3em; width: 1.1rem; height: 1.1rem;
  border: 2px solid var(--accent); border-radius: 4px; background: var(--card);
}

/* ---------- relationship diagram ---------- */
.diagram { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; margin-bottom: 1.25rem; }
.diagram svg { display: block; width: 100%; height: auto; }
.diagram figcaption { font-size: .9rem; color: var(--ink-soft); margin-top: .5rem; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: .6rem; max-width: var(--measure); }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.faq summary {
  cursor: pointer; list-style: none; padding: 1rem 3rem 1rem 1.15rem; position: relative;
  font-family: var(--font-head); font-weight: 700; font-size: 1.05rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 1.15rem; top: .85rem; font-size: 1.4rem; color: var(--accent); line-height: 1; }
.faq details[open] summary::after { content: "âˆ’"; }
.faq .faq-body { padding: 0 1.15rem 1rem; }
.faq .faq-body > :last-child { margin-bottom: 0; }

/* ---------- CTA ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem; min-height: 48px;
  padding: .7rem 1.2rem; border-radius: var(--radius-sm);
  background: var(--accent); color: var(--accent-ink); text-decoration: none;
  font-family: var(--font-head); font-weight: 700; border: 2px solid var(--accent);
}
.btn:hover { filter: brightness(1.1); }
.btn--ghost { background: transparent; color: var(--accent); }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.25rem; }
.cta-panel { background: var(--accent-soft); border-radius: var(--radius); padding: clamp(1.25rem, 3vw, 2.25rem); }
.cta-panel h2 { margin-bottom: .5rem; }

/* ---------- next / related links ---------- */
.related { list-style: none; padding: 0; display: grid; gap: .5rem; }
.related li { margin: 0; }
.related a { display: block; padding: .8rem 1rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); font-weight: 700; font-family: var(--font-head); text-decoration: none; }
.related a:hover { border-color: var(--accent); }
.related span { display: block; font-weight: 400; font-family: var(--font-body); color: var(--ink-soft); font-size: .92rem; }
@media (min-width: 720px) { .related { grid-template-columns: repeat(2, 1fr); } }

/* ---------- sources ---------- */
.sources { font-size: .94rem; }
.sources h3 { font-size: 1rem; margin-top: 1rem; }
.sources ul { padding-left: 1.1rem; }
.checked { font-size: .88rem; color: var(--ink-soft); }

/* ---------- footer ---------- */
.site-footer { background: #22201e; color: #e9e4dc; margin-top: var(--space-5); padding: var(--space-4) 0 var(--space-3); font-size: .95rem; }
.site-footer a { color: #fff; }
.site-footer h2 { color: #fff; font-size: 1rem; margin-bottom: .6rem; }
.footer-grid { display: grid; gap: 2rem; }
@media (min-width: 820px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer-nav { list-style: none; padding: 0; margin: 0; }
.footer-nav li + li { margin-top: .3rem; }
.disclaimer { border-top: 1px solid #45413c; margin-top: 2rem; padding-top: 1.25rem; color: #c9c2b8; font-size: .88rem; }

/* ---------- print ---------- */
@media print {
  .site-header .site-nav, .nav-toggle, .skip-link, .btn-row, .site-footer .footer-nav { display: none !important; }
  body { background: #fff; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .8em; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
