/* CITY HELPERS website - site.css
   One stylesheet for every page. System fonts only, no images in CSS, nothing loaded from anywhere else.
   Two page shells use it: complete documents (header and footer are landmarks around <main class="ch-main">) and
   the older pages shown inside the Bricks theme, where the theme prints <article id="brx-content" class="wordpress">
   with the page title as its <h1> and our markup after it (the flex order below puts the header on top).
   Colours are the game's own (data/game.data.js): navy #1d2b53, yellow #ffd23f, sky #8fd3ff, green #3ddc84.
   Text contrast is 7:1 or better on every background used here. */
:root {
  --navy: #1d2b53; --ink: #172245; --soft: #3d4a6b; --paper: #fffdf7; --white: #ffffff;
  --yellow: #ffd23f; --sky: #dff1ff; --sky2: #8fd3ff; --green: #3ddc84; --cream: #fff3cf; --mint: #e3f9ec;
  --link: #1a3fa8; --line: #1d2b53;
  --gutter: max(1.25rem, calc((100% - 70rem) / 2));
  --font: ui-rounded, "SF Pro Rounded", "Hiragino Maru Gothic ProN", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 1rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto !important; } }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font); font-size: 1.125rem; line-height: 1.6; }
body > aside[aria-label="Skip links"] { display: none; }   /* the theme's own skip link: ours (below) is the first stop */

.ch, #brx-content.wordpress { color: var(--ink); font-family: var(--font); font-size: 1.125rem; line-height: 1.6; overflow-wrap: break-word; }
#brx-content.wordpress { display: flex; flex-direction: column; width: 100%; max-width: none; margin: 0; padding: 0; background: var(--paper); }
#brx-content.wordpress > .ch-skip { order: -4; } #brx-content.wordpress > .ch-top { order: -3; }
#brx-content.wordpress > .ch-crumbs { order: -2; } #brx-content.wordpress > h1 { order: -1; }
.ch-main { display: block; }
.ch *, .ch *::before, .ch *::after, #brx-content.wordpress > h1 { box-sizing: border-box; }
.ch img { max-width: 100%; height: auto; display: block; }
.ch a { color: var(--link); text-decoration: underline; text-decoration-thickness: 0.09em; text-underline-offset: 0.18em; }
.ch a:hover { text-decoration-thickness: 0.16em; }
.ch a:focus-visible, .ch button:focus-visible, .ch summary:focus-visible, .ch [tabindex]:focus-visible, .ch iframe:focus-visible {
  outline: 3px solid var(--navy); outline-offset: 3px; box-shadow: 0 0 0 7px var(--yellow); border-radius: 0.5rem; }
.ch p, .ch ul, .ch ol, .ch dl, .ch table, .ch figure, .ch blockquote { margin: 0 0 1.15rem; font-size: 1.125rem; line-height: 1.6; }
.ch li { margin: 0 0 0.45rem; font-size: 1.125rem; line-height: 1.6; }
.ch ul, .ch ol { padding-left: 1.4rem; }
.ch p:last-child { margin-bottom: 0; }
.ch h2, .ch h3 { color: var(--navy); font-weight: 800; line-height: 1.2; margin: 0 0 0.8rem; letter-spacing: -0.01em; }
.ch h2 { font-size: clamp(1.6rem, 1.1rem + 2.2vw, 2.25rem); }
.ch h3 { font-size: clamp(1.25rem, 1.1rem + 0.7vw, 1.45rem); }
.ch strong { font-weight: 800; }

/* ---- skip link */
.ch-skip { margin: 0; }
.ch-skip a { position: absolute; left: 0.75rem; top: -6rem; z-index: 50; background: var(--yellow); color: var(--navy); font-weight: 800; padding: 0.8rem 1.1rem; border: 3px solid var(--navy); border-radius: 0.75rem; text-decoration: none; }
.ch-skip a:focus { top: 0.75rem; }

/* ---- header */
.ch-top { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; padding: 0.6rem var(--gutter); background: var(--white); border-bottom: 3px solid var(--navy); position: relative; }
.ch-top .ch-logo { display: inline-flex; align-items: center; gap: 0.55rem; min-height: 3rem; margin: 0 auto 0 0; font-size: 1.35rem; font-weight: 800; letter-spacing: -0.01em; color: var(--navy); text-decoration: none; }
.ch-top .ch-logo img { width: 2.75rem; height: 2.75rem; border-radius: 0.7rem; }
.ch-nav { display: none; margin: 0; }
.ch-nav ul, .ch-menu ul { list-style: none; margin: 0; padding: 0; }
.ch-nav li, .ch-menu li { margin: 0; }
.ch-nav a, .ch-menu nav a { display: flex; align-items: center; min-height: 2.75rem; padding: 0.3rem 0.8rem; border-radius: 999px; color: var(--navy); font-weight: 700; font-size: 1.05rem; text-decoration: none; }
.ch-nav a:hover, .ch-menu nav a:hover { background: var(--sky); }
.ch-nav a[aria-current], .ch-menu nav a[aria-current] { background: var(--sky); box-shadow: inset 0 0 0 2px var(--navy); }
.ch-menu { order: 3; }
.ch-menu > summary { list-style: none; display: inline-flex; align-items: center; gap: 0.45rem; min-height: 2.75rem; padding: 0.3rem 0.9rem; border: 2px solid var(--navy); border-radius: 999px; background: var(--white); color: var(--navy); font-weight: 800; font-size: 1.05rem; cursor: pointer; }
.ch-menu > summary::-webkit-details-marker { display: none; }
.ch-menu > summary svg { width: 1.2rem; height: 1.2rem; }
@media (max-width: 26rem) {   /* a phone: the menu button is its picture only (its name stays for screen readers) */
  :root { --gutter: 1rem; }
  .ch-top { gap: 0.4rem 0.45rem; } .ch-top .ch-logo { font-size: 1.1rem; gap: 0.35rem; } .ch-top .ch-logo img { width: 2.5rem; height: 2.5rem; }
  .ch-menu > summary { padding: 0.3rem 0.65rem; } .ch-menu > summary span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .ch-top .ch-btn { padding: 0.35rem 0.7rem; gap: 0.35rem; }
}
.ch-menu[open] > summary { background: var(--sky); }
.ch-menu > nav { position: absolute; left: 0; right: 0; top: 100%; z-index: 40; background: var(--white); border-bottom: 3px solid var(--navy); padding: 0.6rem var(--gutter) 1rem; box-shadow: 0 0.6rem 1.2rem rgba(29, 43, 83, 0.18); }
.ch-menu nav a { min-height: 3rem; font-size: 1.15rem; border-radius: 0.8rem; }
@media (min-width: 62rem) {
  .ch-nav { display: block; } .ch-nav ul { display: flex; flex-wrap: wrap; gap: 0.15rem; } .ch-menu { display: none; }
}

/* ---- buttons */
.ch .ch-btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem; min-height: 3rem; padding: 0.55rem 1.3rem; border: 3px solid var(--navy); border-radius: 999px; background: var(--yellow); color: var(--navy); font-family: inherit; font-size: 1.1rem; font-weight: 800; line-height: 1.2; text-decoration: none; cursor: pointer; box-shadow: 0 4px 0 var(--navy); }
.ch .ch-btn svg { width: 1.1em; height: 1.1em; flex: none; }
.ch .ch-btn--play { background: var(--green); }
.ch .ch-btn--big { min-height: 4rem; padding: 0.8rem 2rem; font-size: 1.45rem; box-shadow: 0 6px 0 var(--navy); }
.ch .ch-btn--plain { background: var(--white); }
.ch .ch-btn:hover { filter: brightness(1.06); }
.ch .ch-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--navy); }
@media (prefers-reduced-motion: no-preference) { .ch .ch-btn { transition: transform 0.08s ease, box-shadow 0.08s ease; } }
.ch-top .ch-btn { order: 2; min-height: 2.75rem; padding: 0.35rem 1.1rem; }

/* ---- the bands of a page */
.ch-crumbs, .ch-h1, #brx-content.wordpress > h1, .ch-intro, .ch-sec, .ch-more, .ch-end { padding-left: var(--gutter); padding-right: var(--gutter); }
.ch-crumbs { background: var(--sky); padding-top: 0.7rem; margin: 0; }
.ch-crumbs ol { display: flex; flex-wrap: wrap; gap: 0 0.35rem; list-style: none; margin: 0; padding: 0; font-size: 1rem; }
.ch-crumbs li { display: flex; align-items: center; margin: 0; font-size: 1rem; color: var(--soft); }
.ch-crumbs li + li::before { content: "\203A"; margin-right: 0.35rem; color: var(--soft); }
.ch-crumbs a { display: inline-flex; align-items: center; min-height: 2.75rem; min-width: 2.75rem; color: var(--navy); font-weight: 700; }
.ch-h1, #brx-content.wordpress > h1 { margin: 0; padding-top: 0.6rem; padding-bottom: 0.4rem; background: var(--sky); color: var(--navy); font-family: var(--font); font-size: clamp(2rem, 1.2rem + 3.8vw, 3.4rem); font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; text-wrap: balance; }
.ch-home .ch-h1 { padding-top: 2rem; font-size: clamp(2.3rem, 1.2rem + 5vw, 4.2rem); }
.ch-intro { background: var(--sky); padding-top: 0.6rem; padding-bottom: 2.2rem; display: grid; gap: 1.5rem; align-items: start; border-bottom: 3px solid var(--navy); }
.ch-intro .ch-lead { font-size: clamp(1.2rem, 1.05rem + 0.8vw, 1.45rem); line-height: 1.5; margin: 0 0 1.1rem; max-width: 40ch; color: var(--ink); }
.ch-intro .ch-needs { font-size: 1rem; color: var(--soft); margin: 0.9rem 0 0; max-width: 46ch; }
.ch-intro .ch-row { display: flex; flex-wrap: wrap; gap: 0.9rem 0.8rem; align-items: center; margin: 0; }
.ch-intro figure { margin: 0; }
.ch-pic { border: 3px solid var(--navy); border-radius: 1.25rem; overflow: hidden; background: var(--sky2); box-shadow: 0 6px 0 var(--navy); }
.ch-pic img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
@media (min-width: 56rem) { .ch-intro { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 2.5rem; padding-bottom: 3rem; } .ch-intro--text { grid-template-columns: minmax(0, 1fr); } }

.ch-sec { padding-top: 2.6rem; padding-bottom: 2.6rem; }
.ch-sec:nth-of-type(even) { background: var(--white); }
.ch-sec > p, .ch-sec > ul, .ch-sec > ol, .ch-sec > dl, .ch-sec > h2, .ch-sec > h3, .ch-sec > blockquote, .ch-sec > .note, .ch-sec > details { max-width: 44rem; }
.ch-sec > h3 { margin-top: 1.6rem; }
.ch-sec > .ch-facts { max-width: 58rem; }
@media (min-width: 62rem) {   /* a wide screen: a section's first picture stands beside its text */
  .ch-sec:has(> .ch-fig):not(:has(> .cards, > .ch-scroll, > .pair)) { display: grid; grid-template-columns: minmax(0, 44rem) minmax(0, 1fr); column-gap: 3rem; align-items: start; }
  .ch-sec:has(> .ch-fig):not(:has(> .cards, > .ch-scroll, > .pair)) > * { grid-column: 1; }
  .ch-sec:has(> .ch-fig):not(:has(> .cards, > .ch-scroll, > .pair)) > .ch-fig { grid-column: 2; grid-row: 1 / span 40; margin: 0.4rem 0 0; }
  .ch-sec:has(> .ch-fig):not(:has(> .cards, > .ch-scroll, > .pair)) > .ch-fig ~ .ch-fig { grid-column: 1; grid-row: auto; margin: 0 0 1.4rem; }
}

/* ---- building blocks */
.ch .ticks { list-style: none; padding-left: 0; }
.ch .ticks > li { position: relative; padding-left: 2rem; }
.ch .ticks > li::before { content: ""; position: absolute; left: 0.15rem; top: 0.42em; width: 1.1rem; height: 0.6rem; border-left: 0.28rem solid #14804a; border-bottom: 0.28rem solid #14804a; transform: rotate(-45deg) scale(0.8); transform-origin: left; }
.ch .steps { list-style: none; counter-reset: step; padding-left: 0; }
.ch .steps > li { counter-increment: step; position: relative; padding: 0.15rem 0 0.15rem 3.3rem; margin-bottom: 0.9rem; min-height: 2.5rem; }
.ch .steps > li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 2.4rem; height: 2.4rem; display: grid; place-items: center; background: var(--yellow); color: var(--navy); border: 3px solid var(--navy); border-radius: 50%; font-weight: 800; font-size: 1.1rem; line-height: 1; }
.ch .pair { display: grid; gap: 1.2rem; margin: 0 0 1.15rem; }
.ch .pair > div { background: var(--mint); border: 3px solid var(--navy); border-radius: 1.1rem; padding: 1.2rem 1.3rem; }
.ch .pair > div + div { background: var(--cream); }
.ch .pair ul { margin-bottom: 0; }
@media (min-width: 48rem) { .ch .pair { grid-template-columns: 1fr 1fr; } }
.ch .cards { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); margin: 0 0 1.15rem; }
.ch .card { position: relative; background: var(--white); border: 3px solid var(--navy); border-radius: 1.1rem; padding: 1.1rem 1.2rem 1.2rem; overflow: hidden; }
.ch-sec:nth-of-type(even) .card { background: var(--paper); }
.ch .card h3 { font-size: 1.3rem; margin-bottom: 0.4rem; }
.ch .card h3 a { color: var(--navy); }
.ch .card h3 a::after { content: ""; position: absolute; inset: 0; }             /* the whole card is the link's target */
.ch .card:has(h3 a) { box-shadow: 0 5px 0 var(--navy); }
.ch .card:has(h3 a:hover) { background: var(--sky); }
.ch .card:has(h3 a:focus-visible) { outline: 3px solid var(--navy); outline-offset: 3px; box-shadow: 0 0 0 7px var(--yellow); }
.ch .card h3 a:focus-visible { outline: none; box-shadow: none; }
.ch .card p { font-size: 1.05rem; margin-bottom: 0; }
.ch .card .ch-card-pic { margin: -1.1rem -1.2rem 0.9rem; border-bottom: 3px solid var(--navy); background: var(--sky2); }
.ch .card .ch-card-pic img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.ch .note { background: var(--cream); border: 3px solid var(--navy); border-radius: 1.1rem; padding: 1.1rem 1.3rem; margin: 0 0 1.15rem; }
.ch .note h3 { font-size: 1.15rem; margin-bottom: 0.4rem; }
.ch .says { position: relative; background: var(--white); border: 3px solid var(--navy); border-radius: 1.3rem; padding: 0.9rem 1.2rem; margin: 0 0 1.6rem; max-width: 36rem; font-weight: 700; color: var(--navy); }
.ch-sec:nth-of-type(even) .says { background: var(--sky); }
.ch .says::after { content: ""; position: absolute; left: 2rem; bottom: -0.85rem; width: 1.3rem; height: 1.3rem; background: inherit; border-right: 3px solid var(--navy); border-bottom: 3px solid var(--navy); transform: rotate(45deg) skew(12deg, 12deg); }
.ch .says p { font-size: 1.2rem; line-height: 1.45; }
.ch .says p::before { content: "\201C"; } .ch .says p::after { content: "\201D"; }
.ch-fig { margin: 0 0 1.4rem; max-width: 46rem; }
.ch-fig figcaption { font-size: 1rem; line-height: 1.5; color: var(--soft); margin-top: 0.7rem; }
.ch-scroll { overflow-x: auto; margin: 0 0 1.15rem; border: 3px solid var(--navy); border-radius: 1.1rem; background: var(--white); max-width: 58rem; }
.ch table { border-collapse: collapse; width: 100%; margin: 0; font-size: 1.05rem; }
.ch caption { text-align: left; font-weight: 800; color: var(--navy); padding: 0.8rem 1rem; font-size: 1.1rem; line-height: 1.4; }
.ch th, .ch td { text-align: left; vertical-align: top; padding: 0.6rem 1rem; border-top: 2px solid #c9d6ee; font-size: 1.05rem; line-height: 1.5; }
.ch thead th { background: var(--sky); border-top: 3px solid var(--navy); border-bottom: 3px solid var(--navy); color: var(--navy); white-space: nowrap; }
.ch tbody th { font-weight: 800; color: var(--navy); min-width: 9rem; }
.ch dl { margin: 0 0 1.15rem; }
.ch dt { font-weight: 800; color: var(--navy); margin-top: 0.9rem; font-size: 1.125rem; }
.ch dd { margin: 0.15rem 0 0; font-size: 1.125rem; }
.ch .qa { border: 3px solid var(--navy); border-radius: 1.1rem; background: var(--white); margin: 0 0 0.8rem; }
.ch .qa > summary { cursor: pointer; padding: 0.85rem 1.2rem; min-height: 3rem; font-weight: 800; font-size: 1.15rem; color: var(--navy); border-radius: 0.9rem; }
.ch .qa[open] > summary { background: var(--sky); border-radius: 0.9rem 0.9rem 0 0; }
.ch .qa > p { padding: 0.9rem 1.2rem 1.1rem; margin: 0; }
.ch .ch-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.7rem 1rem; margin: 1.4rem 0 0; }
.ch .ch-cta > span { font-size: 1rem; color: var(--soft); max-width: 30ch; line-height: 1.4; }

/* ---- more to read, the closing band, the footer */
.ch-more { padding-top: 2.4rem; padding-bottom: 2.4rem; background: var(--cream); border-top: 3px solid var(--navy); }
.ch-more ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0.7rem; margin: 0; padding: 0; }
.ch-more li { margin: 0; }
.ch-more a { display: inline-flex; align-items: center; min-height: 2.9rem; padding: 0.35rem 1.05rem; background: var(--white); border: 2px solid var(--navy); border-radius: 999px; color: var(--navy); font-weight: 700; font-size: 1.05rem; text-decoration: none; }
.ch-more a:hover { background: var(--sky); }
.ch-end { padding-top: 2.8rem; padding-bottom: 3rem; background: var(--sky2); border-top: 3px solid var(--navy); text-align: center; }
.ch-end h2 { font-size: clamp(1.7rem, 1.2rem + 2.4vw, 2.5rem); margin-bottom: 0.6rem; }
.ch-end p { max-width: 42rem; margin-left: auto; margin-right: auto; }
.ch-end .ch-row { display: flex; justify-content: center; margin: 1.3rem 0 1.2rem; }
.ch-end .ch-needs { font-size: 1.05rem; color: var(--ink); }
.ch-foot { background: var(--navy); color: #ffffff; padding: 2.6rem var(--gutter) 2rem; }
.ch-foot nav { display: grid; gap: 1.6rem 2rem; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }
.ch-foot h2 { color: #ffffff; font-size: 1.15rem; margin: 0 0 0.3rem; }
.ch-foot ul { list-style: none; margin: 0; padding: 0; }
.ch-foot li { margin: 0; }
.ch.ch-foot a, .ch .ch-foot a { display: inline-flex; align-items: center; min-height: 2.75rem; min-width: 2.75rem; color: #ffe58a; font-size: 1.05rem; }
.ch-foot a:focus-visible { outline-color: #ffffff; }
.ch-foot .ch-small { margin: 1.8rem 0 0; padding-top: 1.2rem; border-top: 2px solid #5b6aa0; font-size: 1rem; color: #ffffff; }

/* ---- the home page's own pieces */
.ch-helpers { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15.5rem), 1fr)); margin: 0 0 1.15rem; }
.ch-facts { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); list-style: none; padding: 0; margin: 0 0 1.15rem; }
.ch .ch-facts li { background: var(--white); border: 3px solid var(--navy); border-radius: 1.1rem; padding: 0.9rem 1rem; margin: 0; font-size: 1.05rem; line-height: 1.4; }
.ch .ch-facts strong { display: block; font-size: 2rem; line-height: 1.1; color: var(--navy); }
.ch-split { display: grid; gap: 1.6rem; align-items: center; }
@media (min-width: 56rem) { .ch-split { grid-template-columns: 1fr 1fr; gap: 2.5rem; } .ch-split--flip > :first-child { order: 2; } }
.ch-split .ch-fig { margin: 0; }

/* ---- the play page: the game fills the window */
.ch-play { margin: 0; background: var(--navy); }
.ch-play .ch-bar { display: flex; align-items: center; gap: 0.5rem 0.8rem; min-height: 3.25rem; padding: 0.25rem 0.8rem; background: var(--white); border-bottom: 3px solid var(--navy); }
.ch-play .ch-bar .ch-logo { display: inline-flex; align-items: center; gap: 0.45rem; min-height: 2.75rem; font-weight: 800; color: var(--navy); text-decoration: none; font-size: 1.05rem; }
.ch-play .ch-bar .ch-logo img { width: 2.25rem; height: 2.25rem; border-radius: 0.55rem; }
.ch-play .ch-bar h1 { margin: 0 auto 0 0.4rem; font-size: 1.05rem; font-weight: 800; color: var(--navy); line-height: 1.2; }
.ch-play .ch-bar .ch-btn { min-height: 2.75rem; padding: 0.3rem 0.9rem; font-size: 1rem; box-shadow: 0 3px 0 var(--navy); }
.ch-play .ch-bar .ch-btn { white-space: nowrap; }
@media (max-width: 34rem) { .ch-play .ch-bar h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; } .ch-play .ch-bar .ch-logo { margin-right: auto; } }
.ch-play .ch-hide-s { display: none; }
@media (min-width: 40rem) { .ch-play .ch-hide-s { display: inline; } }
.ch-play .ch-stage { position: relative; height: calc(100vh - 3.5rem); height: calc(100dvh - 3.5rem); min-height: 15rem; background: var(--sky2); }
.ch-play .ch-stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.ch-play .ch-about { background: var(--paper); padding: 2rem var(--gutter) 2.4rem; }
.ch-play .ch-about > * { max-width: 44rem; }

/* ---- Windows contrast themes: borders and text carry everything, so let the system colours through */
@media (forced-colors: active) {
  .ch .ch-btn, .ch .card, .ch .note, .ch .says, .ch .qa, .ch-pic, .ch-scroll, .ch .pair > div, .ch .ch-facts li { border-color: CanvasText; box-shadow: none; }
  .ch .steps > li::before { border-color: CanvasText; background: Canvas; color: CanvasText; }
  .ch .ticks > li::before { border-color: CanvasText; }
  .ch-nav a[aria-current], .ch-menu nav a[aria-current] { outline: 2px solid CanvasText; box-shadow: none; }
  .ch a:focus-visible, .ch button:focus-visible, .ch summary:focus-visible { outline: 3px solid Highlight; box-shadow: none; }
  .ch .says::after { display: none; }
}
@media print { .ch-top .ch-btn, .ch-menu, .ch-end .ch-row, .ch .ch-cta { display: none; } }
