/* Access Compass — pre-rendered pages. Accessible by construction:
   colours meet WCAG AA on their backgrounds; layout is rem-based and scales to
   200%+ zoom; focus is always visible; motion respects prefers-reduced-motion. */

:root {
  --navy: #12233f;
  --navy-2: #1d3557;
  --cream: #fdf8f0;
  --ink: #1a1a1a;
  --ink-soft: #40474f;
  --accent: #b23a2e;        /* warm rust — AA on cream */
  --accent-ink: #8f2d24;    /* darker for small text */
  --btn-fill: #b23a2e;
  --btn-fill-hover: #8f2d24;
  --rule: #e2d8c6;
  --card: #ffffff;
  --ok: #216e39;            /* verified green — AA on white */
  --ok-bg: #e6f2ea;
  --draft: #8a5a00;         /* not-yet-verified amber — AA on white */
  --draft-bg: #fbf1dc;
  --official: #1d3557;
  --official-bg: #e7edf6;
  --shadow: 0 1px 2px rgba(18, 35, 63, .06), 0 8px 24px rgba(18, 35, 63, .08);
  --maxw: 46rem;
  --wide: 64rem;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  font-size: 1.125rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.wrap { width: 100%; max-width: var(--wide); margin-inline: auto; padding-inline: 1.25rem; }

h1, h2, h3, .brand, .btn, .site-head nav, .badge, .guide__eyebrow, .index-hero__standfirst, .cat-toc__label {
  font-family: "Outfit Variable", "Outfit", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

a { color: var(--accent-ink); }
a:focus-visible, .btn:focus-visible {
  outline: 3px solid var(--navy-2);
  outline-offset: 2px;
  border-radius: 3px;
}

.skip-link { position: absolute; left: -999px; top: 0; background: var(--navy); color: #fff; padding: .6rem 1rem; z-index: 20; border-radius: 0 0 6px 0; }
.skip-link:focus { left: 0; }

/* ---- site chrome ---- */
.site-head { background: var(--navy); color: #fff; border-bottom: 3px solid var(--accent); }
.site-head__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .85rem; flex-wrap: wrap; }
.brand { color: #fff; font-weight: 700; font-size: 1.2rem; text-decoration: none; letter-spacing: .01em; }
.site-head nav { display: flex; gap: 1.25rem; font-size: 1rem; flex-wrap: wrap; }
.site-head nav a { color: #fff; text-decoration: none; opacity: .92; }
.site-head nav a:hover { opacity: 1; text-decoration: underline; }
.site-head nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 5px; text-decoration-color: var(--accent); text-decoration-thickness: 3px; opacity: 1; }

.site-foot { margin-top: 3.5rem; background: var(--navy); color: #e9eef6; padding-block: 2rem; font-size: .95rem; line-height: 1.6; }
.site-foot p { margin: .5rem 0; max-width: var(--wide); }
.site-foot a { color: #fff; }
.site-foot__links { font-size: .9rem; opacity: .95; }
.site-foot__by { opacity: .82; margin-top: .8rem; }

/* ---- buttons ---- */
.btn { display: inline-block; font-weight: 600; text-decoration: none; padding: .7rem 1.15rem; border-radius: 999px; line-height: 1.2; font-size: 1.02rem; transition: transform .12s ease, background .12s ease; }
.btn--primary { background: var(--btn-fill); color: #fff; box-shadow: var(--shadow); }
.btn--primary:hover { background: var(--btn-fill-hover); transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--accent-ink); border: 1.5px solid var(--rule); }
.btn--ghost:hover { border-color: var(--accent); background: #fff; }

/* ---- verification badges (never colour-alone: glyph/word + text) ---- */
.badge { display: inline-block; font-family: "Outfit Variable", sans-serif; font-weight: 700; font-size: .74rem; letter-spacing: .03em; text-transform: uppercase; padding: .18rem .55rem; border-radius: 999px; border: 1px solid transparent; white-space: nowrap; }
.badge--verified { color: var(--ok); background: var(--ok-bg); border-color: #bfe0cc; }
.badge--official { color: var(--official); background: var(--official-bg); border-color: #c4d2e8; }
.badge--draft { color: var(--draft); background: var(--draft-bg); border-color: #ecd8a8; }

/* ---- breadcrumb ---- */
.crumbs { font-size: .9rem; color: var(--ink-soft); margin-bottom: 1rem; font-family: "Outfit Variable", sans-serif; }
.crumbs a { color: var(--accent-ink); }

/* ---- index heroes ---- */
.index-hero { padding-block: 2.5rem 1rem; max-width: var(--maxw); }
.index-hero h1 { font-size: clamp(2.2rem, 6vw, 3.4rem); margin: 0 0 .6rem; color: var(--navy); }
.index-hero__standfirst { font-size: 1.2rem; color: var(--ink-soft); margin: 0; line-height: 1.5; }

/* ---- guide article ---- */
.guide__main { padding-top: 1.5rem; }
.guide__article { max-width: var(--maxw); margin-inline: auto; }
.guide__eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 700; color: var(--accent-ink); margin: 0 0 .4rem; font-family: "Outfit Variable", sans-serif; }
.guide__head h1 { font-size: clamp(1.9rem, 5vw, 2.9rem); line-height: 1.12; margin: 0 0 .7rem; color: var(--navy); }
.guide__summary { font-size: 1.28rem; line-height: 1.5; color: var(--ink); margin: 0 0 1rem; }
.guide__audience { font-size: .98rem; color: var(--ink-soft); margin: .3rem 0; }
.guide__audience-label { font-family: "Outfit Variable", sans-serif; font-weight: 700; color: var(--accent-ink); }

.guide__article h2 { font-size: clamp(1.4rem, 3.5vw, 1.9rem); line-height: 1.15; margin: 2.2rem 0 .8rem; color: var(--navy); }

/* ---- honesty line (verification + last-checked + confirm) ---- */
.honesty { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 1.2rem 0; padding: .75rem .9rem; background: #f4f1ea; border: 1px solid var(--rule); border-radius: 10px; font-size: .95rem; color: var(--ink-soft); font-family: "Outfit Variable", sans-serif; }
.honesty__checked { font-weight: 600; }
.honesty__confirm { flex-basis: 100%; }

/* ---- steps (ordered list) ---- */
.steps { min-width: 0; list-style: none; counter-reset: step; margin: 1rem 0; padding: 0; display: grid; gap: 1rem; }
.step { min-width: 0; position: relative; counter-increment: step; background: var(--card); border: 1px solid var(--rule); border-radius: 12px; box-shadow: var(--shadow); padding: 1.1rem 1.25rem 1.1rem 3.6rem; }
.step::before { content: counter(step); position: absolute; left: 1rem; top: 1.1rem; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-family: "Outfit Variable", sans-serif; font-weight: 700; font-size: 1rem; }
.step__title { margin: 0 0 .35rem; font-size: 1.18rem; color: var(--navy); }
.step__detail { margin: 0; color: var(--ink); }

/* ---- journey responsibility guides ---- */
.journey-list { list-style: none; margin: 1rem 0; padding: 0; display: grid; gap: .75rem; }
.journey-card { overflow: hidden; background: var(--card); border: 1px solid var(--rule); border-radius: 12px; box-shadow: var(--shadow); }
.journey-card__summary { display: flex; min-height: 3rem; cursor: pointer; flex-direction: column; gap: .2rem; padding: .85rem 1rem; }
.journey-card[open] > .journey-card__summary { border-bottom: 1px solid var(--rule); }
.journey-card__title { font-family: "Outfit Variable", sans-serif; font-weight: 700; color: var(--navy); }
.journey-card__applies { color: var(--ink-soft); font-size: .92rem; }
.journey-card__body { padding: 1rem; }
.journey-card__confirm { margin: 0 0 1rem; padding: .75rem; border-left: 4px solid var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.journey-legs { display: grid; gap: 1rem; margin: 0; padding-left: 1.5rem; }
.journey-legs h3 { margin: 0 0 .45rem; color: var(--navy); font-size: 1.08rem; }
.journey-owners { display: grid; gap: .4rem; margin: 0; }
.journey-owners > div { display: grid; grid-template-columns: minmax(7rem, .3fr) minmax(0, 1fr); gap: .55rem; }
.journey-owners dt { font-weight: 700; }
.journey-owners dd { margin: 0; }
.step__title, .step__detail, .journey-card__title, .journey-card__applies, .journey-card__confirm, .journey-owners { overflow-wrap: anywhere; }

/* ---- links + source ---- */
.guide__publisher { margin: .7rem 0; color: var(--ink-soft); font-family: "Outfit Variable", sans-serif; font-size: .92rem; }
.article-toc { margin: 1.5rem 0 2rem; padding: 1rem 1.2rem; background: var(--card); border: 1px solid var(--rule); border-radius: 12px; box-shadow: var(--shadow); }
.article-toc h2 { margin: 0 0 .55rem; font-size: 1.15rem; }
.article-toc ul { margin: 0; padding-left: 1.2rem; columns: 2; column-gap: 2rem; }
.article-toc li { margin: .25rem 0; break-inside: avoid; }
.guide__links ul { margin: .6rem 0; padding-left: 1.2rem; }
.guide__links li { margin: .4rem 0; }
.guide__source { font-size: .9rem; color: var(--ink-soft); margin-top: 1.2rem; word-break: break-word; }
.related-guides { margin-top: 2rem; padding-top: 1.5rem; border-top: 2px solid var(--rule); }
.related-guides__eyebrow { margin: 0 0 .25rem; color: var(--accent-ink); font-family: "Outfit Variable", sans-serif; font-size: .82rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.related-guides h2 { margin-top: 0; }
.related-guides ul { margin: .6rem 0; padding-left: 1.2rem; }
.related-guides li { margin: .45rem 0; }

/* ---- closing CTA ---- */
.cta-band { margin-top: 3rem; padding: 2rem 1.75rem; background: var(--navy); color: #fff; border-radius: 16px; }
.cta-band h2 { margin: 0 0 .6rem; color: #fff; }
.cta-band p { margin: 0 0 1rem; color: #e9eef6; }
.cta-band .btn--ghost { color: #fff; border-color: rgba(255,255,255,.5); }
.cta-band .btn--ghost:hover { background: rgba(255,255,255,.12); border-color: #fff; }

/* ---- guides index grid ---- */
.guide-grid { list-style: none; margin: 2rem 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); gap: 1.5rem; }
.guide-card { background: var(--card); border: 1px solid var(--rule); border-radius: 14px; box-shadow: var(--shadow); }
.guide-card a { display: flex; flex-direction: column; gap: .5rem; height: 100%; padding: 1.2rem 1.25rem 1.3rem; text-decoration: none; color: inherit; }
.guide-card__title { font-family: "Outfit Variable", sans-serif; font-weight: 700; font-size: 1.25rem; line-height: 1.25; color: var(--navy); }
.guide-card__desc { color: var(--ink-soft); font-size: 1rem; line-height: 1.5; }
.guide-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: auto; }
.guide-card__checked { font-size: .8rem; color: var(--ink-soft); font-family: "Outfit Variable", sans-serif; }
.guide-card a:hover .guide-card__title { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.guide-topic { margin-top: 2.8rem; scroll-margin-top: 1rem; }
.guide-topic > h2 { display: flex; align-items: baseline; gap: .6rem; margin-bottom: .35rem; border-bottom: 2px solid var(--rule); padding-bottom: .4rem; color: var(--navy); }
.guide-topic > p { margin-top: 0; color: var(--ink-soft); max-width: 52rem; }
.guide-topic .guide-grid { margin-top: 1.2rem; }

/* ---- services directory ---- */
.cat-toc { margin: 1.5rem 0 2rem; padding: 1.1rem 1.25rem; background: var(--card); border: 1px solid var(--rule); border-radius: 12px; box-shadow: var(--shadow); }
.cat-toc__label { text-transform: uppercase; letter-spacing: .1em; font-size: .75rem; font-weight: 700; color: var(--ink-soft); margin: 0 0 .6rem; }
.cat-toc ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem .9rem; }
.cat-toc a { font-family: "Outfit Variable", sans-serif; font-size: .95rem; text-decoration: none; color: var(--accent-ink); }
.cat-toc a:hover { text-decoration: underline; }
.toc__count { color: var(--ink-soft); font-size: .85rem; }

.cat { margin-top: 2.5rem; }
.cat__title { font-size: clamp(1.4rem, 3.5vw, 1.9rem); color: var(--navy); border-bottom: 2px solid var(--rule); padding-bottom: .4rem; margin: 0 0 1.2rem; display: flex; align-items: baseline; gap: .6rem; }
.cat__count { font-family: "Outfit Variable", sans-serif; font-size: .95rem; font-weight: 600; color: #fff; background: var(--navy-2); border-radius: 999px; padding: .1rem .6rem; }

.svc-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr)); gap: 1.25rem; }
.svc { background: var(--card); border: 1px solid var(--rule); border-radius: 14px; box-shadow: var(--shadow); padding: 1.1rem 1.25rem 1.2rem; }
.svc__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem; }
.svc__name { margin: 0; font-size: 1.2rem; color: var(--navy); line-height: 1.25; }
.svc__sub { margin: .2rem 0 0; font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; font-family: "Outfit Variable", sans-serif; color: var(--accent-ink); }
.svc__summary { margin: .6rem 0; color: var(--ink); font-size: 1rem; line-height: 1.5; }
.svc__meta { margin: .5rem 0; font-size: .9rem; color: var(--ink-soft); display: flex; flex-wrap: wrap; gap: .4rem .8rem; font-family: "Outfit Variable", sans-serif; }
.svc__cost { font-weight: 700; color: var(--ok); }
.svc__contact { margin: .5rem 0; font-size: .95rem; line-height: 1.6; }
.svc__contact a { color: var(--accent-ink); word-break: break-word; }
.svc__contact--none { color: var(--ink-soft); font-style: italic; }
.svc__sep { color: var(--ink-soft); }
.svc__checked { margin: .5rem 0 0; font-size: .8rem; color: var(--ink-soft); font-family: "Outfit Variable", sans-serif; }

/* ---- responsive ---- */
@media (max-width: 52rem) {
  body { font-size: 1.06rem; }
  .svc-list, .guide-grid { grid-template-columns: 1fr; }
  .journey-owners > div { grid-template-columns: 1fr; gap: .05rem; }
  .article-toc ul { columns: 1; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

/* ---- dark mode (opt-in via OS) ---- */
@media (prefers-color-scheme: dark) {
  :root {
    --cream: #14171c;
    --ink: #eef1f5;
    --ink-soft: #b6bfca;
    --card: #1d222b;
    --rule: #333a45;
    --navy: #0e1a2f;
    --accent: #e8735f;
    --accent-ink: #f0937f;
    --ok: #7fd074; --ok-bg: #17301f;
    --draft: #e8c069; --draft-bg: #2e2717;
    --official: #b8ccec; --official-bg: #1a2438;
  }
  .index-hero h1, .guide__head h1, .guide__article h2, .cat__title, .guide-topic > h2,
  .svc__name, .guide-card__title, .step__title, .journey-card__title, .journey-legs h3 { color: #e8edf4; }
  .badge--verified { border-color: #2f6b28; }
  .badge--official { border-color: #33507e; }
  .badge--draft { border-color: #5a4a1e; }
  .honesty { background: #20242c; }
}
