/**
 * The Traffic Plans Company - Knowledge Hub (/knowledge-hub/)
 * Rollout 4 - THEA-704 - v2.0 REBUILD, v3.0 LEARNING HUB (founder 2026-10-01)
 *
 * ARCHITECTURE: this file is PAGE-SPECIFIC ONLY. Site furniture (header,
 * burger menu, action dock, footer, opening splash, buttons, .tpc-proof,
 * .tpc-close, .render-placeholder) is reused BYTE FOR BYTE by linking
 * 01-Rollout-1/hifi/homepage.css and 00-Rollout-0/hifi/components.css
 * directly, per PROJECT-DECISIONS.md "reuse the site furniture, do not
 * reinvent it".
 *
 * v1.0 WAS REJECTED, founder 2026-09-30: "scrolling down it doesnt look or
 * feel anything like the references i gave" and "there shouldn't be a hero
 * section". v1.0 opened with a tall orange split hero (like every other
 * internal page) then fell back to a plain accordion list, the lo-fi's own
 * shape restyled with chips on top. That is the "another web page" feeling
 * being rejected.
 *
 * v2.0 replaces the ENTIRE body below the header:
 * - NO hero band. The page ground is panel-grey; one large white rounded
 *   "workspace panel" holds everything (head row, chips, grid, glossary).
 * - The head row (H1 + lead + search + counts) is compact, not a hero -
 *   it stays well under half the viewport so the first row of cards is
 *   visible on load, per the founder's own reference
 *   (dribbble.com/shots/18782782).
 * - Content is a 3-across image-led card grid, not an accordion list.
 *   Each card is a tinted scene (an approved render filling it), a topic
 *   tag pill, and a white label panel overlapping the lower third holding
 *   the jurisdiction tag + the question title. No visible body copy in
 *   the grid.
 * - Opening a card reveals its full locked answer in a slide-in drawer,
 *   not an inline accordion expansion. The answer text stays in the
 *   served HTML for every card (a <noscript> override makes it visible
 *   without JS; components.css's accordion is NOT used in v2).
 * - The red trust strip moves to directly above the orange close band.
 *
 * Kept from v1.0 unchanged in spirit: sticky filter chips (now filled,
 * never outlined, per the studio's no-outlined-controls rule overriding
 * the reference's own outlined chips), find-as-you-type search, the
 * jurisdiction tags, every locked anchor, the orange close band.
 *
 * Topic tints are color-mix() derivations of --primitive-orange /
 * --primitive-asphalt / --primitive-signal-red only (brand-guard blocks
 * anything else) - see TINTS below for the exact mixes and reasoning.
 *
 * Desktop only. Responsive is deferred to the end of the project per the
 * founder's 2026-09-02 standing rule (PROJECT-DECISIONS.md).
 */

/* ─────────────────────────────────────────────────────────────────────
   PAGE GROUND + WORKSPACE PANEL
   ───────────────────────────────────────────────────────────────────── */
.tpc-kh-page.band {
  padding-block: var(--primitive-space-8);
}

.tpc-kh-panel {
  background: var(--primitive-white);
  border-radius: 32px;
  box-shadow: 0 24px 64px rgba(34, 34, 34, 0.08);
  padding: var(--primitive-space-6) var(--primitive-space-8) var(--primitive-space-9);
  position: relative;
}

/* ─────────────────────────────────────────────────────────────────────
   HERO - v2.1, restored from v1.0 (git a22abca) at the founder's
   direction 2026-10-01, rules unchanged. .tpc-shero--split / .tpc-shero--orange base rules copied from
   services.css v1.59, same precedent as about.css / contact.css /
   case-studies.css (not yet promoted to homepage.css). .tpc-shero--kh
   is the new modifier: taller than the standard 42vh internal-page tier,
   because this hero carries a stats row and a working search field on
   top of the eyebrow/H1/lead every other hero has - the founder-approved
   exception for this one page (2a in the benchmark doc covers the
   INTERNAL and SUB tiers; this is neither, it is the page's own tier).
   ───────────────────────────────────────────────────────────────────── */
/* v3.3 - SAME SIZE AS THE SERVICES HERO (founder 2026-10-01). Every
   value below is services.css's own: the 1.1fr/1fr split, the 42vh
   minimum with space-7 padding, the 40px title and 16px intro. Measured
   at 1440x900 the Services hero is 479px; this one now matches it. The
   v2.1 header-clearance padding is gone: at Services' content height the
   centred stack lands the eyebrow on Services' own line instead. */
.tpc-shero--split .band__inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: var(--primitive-space-8);
  align-items: center;
}
.tpc-shero--split .shero__inner { max-width: none; }

.tpc-shero--orange {
  --tpc-cone-orange: #E8611C;
  --band-bg: linear-gradient(180deg, var(--primitive-orange) 0%, var(--tpc-cone-orange) 100%);
  --band-heading-text: var(--primitive-white);
  --band-h2-text: var(--primitive-white);
  --band-body-text: var(--primitive-white);
}
.tpc-shero--orange.band {
  min-height: 42vh;
  min-height: 42svh;
  padding-block: var(--primitive-space-7);
  display: flex;
  align-items: center;
  overflow: clip;
}
.tpc-shero--orange .shero__title {
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.1;
  /* THEA-798 - closes the gap against the site's own text-wrap convention
     (areas-we-service.css, case-studies.css, contact.css, team.css already
     apply balance/pretty to their headings and body copy). This hero H1 had
     none, and wrapped "The traffic management knowledge base." with "base."
     orphaned alone at 1024/768. balance is best-effort, not a guarantee
     (same caveat recorded in areas-we-service.css), but it is the
     established tool and it resolves this case. */
  text-wrap: balance;
}
.tpc-shero--orange .shero__intro { font-size: 16px; text-wrap: pretty; }
/* v3.9 - white, like the rest of the title (founder 2026-10-01). */
.tpc-shero--kh .shero__title-accent { color: var(--primitive-white); }

/* SEARCH ROW - v3.4: search alone (the stats moved to the red strip). */
.tpc-kh-hero__row {
  display: flex;
  align-items: center;
  gap: var(--primitive-space-5);
  margin-top: var(--primitive-space-6);
}

/* SEARCH - locked copy and markup shape from the lo-fi's own
   .tpc-kh__search / #tpc-kh-search. Find-as-you-type is UI, not content:
   it degrades to nothing without JS (the input still submits nowhere,
   which is fine - there is no server-side search endpoint on this static
   build), and every article stays in the DOM and crawlable regardless of
   whether a visitor's JS ever runs the filter. */
.tpc-kh-hero__search {
  position: relative;
  flex: 1 1 auto;
  max-width: 480px;
}
.tpc-kh-hero__search-icon {
  position: absolute;
  left: var(--primitive-space-4);
  top: 50%;
  transform: translateY(-50%);
  color: var(--primitive-ink);
  opacity: 0.6;
  pointer-events: none;
}
.tpc-kh-hero__search-input {
  width: 100%;
  min-height: 52px;
  padding: 12px var(--primitive-space-4) 12px 46px;
  border-radius: 999px;
  border: none;
  background: var(--primitive-white);
  color: var(--primitive-asphalt);
  font-family: var(--primitive-font-family);
  font-size: 16px;
  box-shadow: 0 8px 24px rgba(34, 34, 34, 0.16);
}
.tpc-kh-hero__search-input::placeholder { color: rgba(65, 65, 66, 0.6); }
/* v3.1 - founder 2026-10-01: "i don't like the black line around the
   search bar". The 3px asphalt outline is replaced by a soft white halo,
   the same "noticeable but not in your face" call made for the request
   form fields (request-forms.css v1.8). Focus still has to be visible
   for keyboard users, so the field is not left bare: a 4px white ring at
   55% reads clearly against the orange hero without a hard edge. */
.tpc-kh-hero__search-input:focus,
.tpc-kh-hero__search-input:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.55), 0 8px 24px rgba(34, 34, 34, 0.16);
}

/* MEDIA - v3.3, the Services hero figure method. The slot takes the
   Services worker's own aspect ratio (1531/1027), so at any width it is
   the same height as the Services slot, and the figure is 1.5x that
   height, as there. Vertical position uses the Services formula
   top = target - head * scale with target 2.9211% (the Services head
   line, 59px from the top of the site at 1440x900).
   v3.9 - knowledge-hub-hero (the founder's image): the alpha scan puts
   the top of the man's hair on row 21 of 1148 = 1.8293%, so
   top = 2.9211 - 1.8293 * 1.5 = 0.1772%. Same head line, same crop by
   the band's overflow:clip. */
.tpc-kh-hero__media {
  position: relative;
  aspect-ratio: 1531 / 1027;
}
.tpc-kh-hero__figure {
  --figure-scale: 1.5;
  display: block;
  position: absolute;
  left: 50%;
  /* v5.0 - the reading planner: alpha scan puts the top of his hair on
     row 79 of 1423 = 5.5517%, so top = 2.9211 - 5.5517 x 1.5 = -5.4064%.
     Same 59px head line as the Services, blog and earlier hub heroes.
     The figure sits higher in its canvas than the studious worker did
     because the trim keeps the floating diagram panel beside his head. */
  top: -5.4064%;
  height: calc(var(--figure-scale) * 100%);
  width: auto;
  max-width: none;
  transform: translateX(-50%);
}

@media (max-width: 1024px) {
  .tpc-shero--split .band__inner { grid-template-columns: 1fr; gap: var(--primitive-space-6); }
  .tpc-kh-hero__media { order: -1; aspect-ratio: auto; }
  .tpc-kh-hero__row { flex-wrap: wrap; }
  /* v4.4 - founder 2026-10-07 (THEA-798 review): below 1024 the figure
     kept its desktop crop (absolute, 150% of the slot) inside a slot that
     had shrunk to a 260px min-height, so it hung ~130px out of the slot,
     over the eyebrow and the H1. Same escape hatch every other hero family
     already uses (contact.css .tpc-shero__worker): the figure returns to
     the flow, uncropped, capped at 46vh, centred, and the slot sizes to it. */
  .tpc-kh-hero__figure {
    position: static;
    top: auto;
    height: auto;
    max-height: 46vh;
    width: auto;
    max-width: 100%;
    margin-inline: auto;
    transform: none;
  }
}

/* ─────────────────────────────────────────────────────────────────────
   v3.0 LEARNING LAYOUT - founder 2026-10-01: "pretend i am very dumb",
   "not make the page so long in scroll length", "engaging, simplistic,
   easy to navigate". A syllabus rail on the left, ONE topic on the
   right. The page used to stack all 20 tiles (panel 4,718px tall at
   1440x900); now it shows one topic of 2 to 5 at a time.
   ───────────────────────────────────────────────────────────────────── */
.tpc-kh-panel.tpc-kh-learn {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: var(--primitive-space-8);
  align-items: start;
  padding: var(--primitive-space-7) var(--primitive-space-7) var(--primitive-space-8);
}

/* RAIL - the lo-fi's own "Browse topics" list, numbered 01 to 06. Sticky
   so the whole syllabus is always one glance away. Every row is FILLED
   when active, never outlined. */
.tpc-kh-rail { position: sticky; top: var(--primitive-space-5); }
.tpc-kh-rail__head {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(34, 34, 34, 0.55);
  margin: 0 0 var(--primitive-space-3) var(--primitive-space-3);
}
.tpc-kh-rail__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tpc-kh-rail__link {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 14px;
  border-radius: 18px;
  color: var(--primitive-asphalt);
  text-decoration: none;
  transition: background-color var(--primitive-duration-fast) var(--primitive-easing-out);
}
.tpc-kh-rail__link:hover { background: var(--primitive-panel-grey); }
.tpc-kh-rail__link.is-active { background: color-mix(in srgb, var(--primitive-orange) 14%, white); }
.tpc-kh-rail__link:focus-visible { outline: 3px solid var(--primitive-asphalt); outline-offset: 2px; }

.tpc-kh-rail__num {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 800;
  background: var(--primitive-panel-grey);
  color: var(--primitive-asphalt);
  transition: background-color var(--primitive-duration-fast) var(--primitive-easing-out);
}
/* Asphalt on orange is 6.89:1; white on orange would be 2.31:1. */
.tpc-kh-rail__link.is-active .tpc-kh-rail__num { background: var(--primitive-orange); }
.tpc-kh-rail__text { display: block; min-width: 0; }
.tpc-kh-rail__title { display: block; font-size: 15px; font-weight: 700; line-height: 1.3; }
.tpc-kh-rail__blurb { display: block; font-size: 13px; line-height: 1.4; color: var(--primitive-ink); margin-top: 3px; text-wrap: pretty; }
.tpc-kh-rail__count {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--primitive-panel-grey);
  margin-top: 2px;
}
.tpc-kh-rail__link.is-active .tpc-kh-rail__count { background: var(--primitive-white); }

/* STAGE - the chosen topic. */
.tpc-kh-stage { min-width: 0; }
.kh-js .tpc-kh-topic:not([data-active]) { display: none; }
.tpc-kh-topic[hidden] { display: none !important; }
html:not(.kh-js) .tpc-kh-topic + .tpc-kh-topic { margin-top: var(--primitive-space-8); }

.tpc-kh-results-count { display: none; font-size: 15px; color: var(--primitive-ink); margin: 0 0 var(--primitive-space-5); }
html:not(.kh-js) .tpc-kh-results-count { display: block; }

.tpc-kh-topic__head {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: var(--primitive-space-5);
  align-items: center;
  margin-bottom: var(--primitive-space-6);
}
.tpc-kh-topic__num {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  font-size: 28px;
  font-weight: 800;
  background: var(--primitive-orange);
  color: var(--primitive-asphalt);
}
.tpc-kh-topic__title {
  font-size: clamp(24px, 2.2vw, 32px);
  font-weight: 800;
  line-height: 1.15;
  color: var(--primitive-asphalt);
  margin: 0 0 6px;
  text-transform: none;
  text-wrap: balance;
}
.tpc-kh-topic__blurb { font-size: 17px; line-height: 1.45; color: var(--primitive-ink); margin: 0; text-wrap: pretty; }

.tpc-kh-topic__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--primitive-space-6) var(--primitive-space-5);
}

/* v3.7 - On to the next lesson, in the site's own CTA (founder: "the same
   style as the other cta's (orange and white text) and also centred").
   .btn.btn--primary from components.css with the white label the
   founder set for orange CTAs in v6.85 (homepage.css .tpc-showcase__cta).
   No arrow, per the founder's form-button call.
   v3.8 - LEFT-ALIGNED to the tiles' left edge (founder 2026-10-01: "can we
   left align the 02 03 04 etc cta buttons instead of centred"). */
.tpc-kh-topic__next {
  display: flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  margin: var(--primitive-space-7) 0 0;
  color: var(--primitive-white);
}
.tpc-kh-topic__next:hover { color: var(--primitive-white); }
.tpc-kh-topic__next-num { opacity: 0.85; }

/* Each time a topic opens, its head and tiles rise in, staggered by the
   --i index on each tile. Display none to block restarts the animation,
   so it replays on every visit to a topic. */
@keyframes tpc-kh-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.kh-js .tpc-kh-topic[data-active] .tpc-kh-topic__head { animation: tpc-kh-rise var(--primitive-duration-mid) var(--primitive-easing-out) both; }
.kh-js .tpc-kh-topic[data-active] .tpc-kh-gcard {
  animation: tpc-kh-rise var(--primitive-duration-mid) var(--primitive-easing-out) both;
  animation-delay: calc(80ms + var(--i, 0) * 70ms);
}

/* ─────────────────────────────────────────────────────────────────────
   TOPIC TINTS - color-mix() from primitives only. Six steps distinguished
   by value/warmth since the palette has no separate hues to draw on
   (one-orange-rule, no blues or greens). The tint only frames the white
   label, so no contrast requirement sits on the tint itself.
   ───────────────────────────────────────────────────────────────────── */
:root {
  --tpc-kh-tint-basics:     color-mix(in srgb, var(--primitive-orange) 20%, white);
  --tpc-kh-tint-plans:      color-mix(in srgb, var(--primitive-orange) 10%, white);
  --tpc-kh-tint-specialist: color-mix(in srgb, var(--primitive-asphalt) 8%, white);
  --tpc-kh-tint-permits:    color-mix(in srgb, var(--primitive-signal-red) 10%, white);
  --tpc-kh-tint-turnaround: color-mix(in srgb, var(--primitive-orange) 32%, var(--primitive-asphalt) 6%);
}

/* ─────────────────────────────────────────────────────────────────────
   CARD - the image-led tile (v2.0's look, kept). v3.0 changes:
   - The tile is an <article>; the real control is a <button> inside the
     <h3> title, so its accessible name is just the question. In v2.0
     the whole tile was a <button> wrapping the full answer, links and
     lists included: invalid HTML, and a screen reader announced the
     entire answer as the button's name.
   - The lo-fi's one-line summary is back under each tile (v2.0 had
     dropped all 19), and the cue is the lo-fi's "Read article".
   - The topic pill is gone from the image: inside a single topic it
     only repeated the heading above.
   - Titles are no longer clamped to three lines (the clamp cut locked
     copy off mid-question).
   ───────────────────────────────────────────────────────────────────── */
.tpc-kh-gcard {
  position: relative;
  /* v3.7 - EQUAL HEIGHTS (founder: "ensure all articles tiles copy and
     read article cta's are the same height"). Each tile is a subgrid
     spanning three rows of the topic grid: scene + label, summary, and
     "Read article". Every tile in a row shares those three tracks, so
     the white labels match, the summaries start on one line and every
     "Read article" sits on one baseline, whatever the copy length. */
  display: grid;
  grid-row: span 3;
  grid-template-rows: subgrid;
  row-gap: 10px;
  align-content: start;
  cursor: pointer;
}
html:not(.kh-js) .tpc-kh-gcard { grid-row: span 4; }
.tpc-kh-gcard__visual { display: flex; flex-direction: column; }
.tpc-kh-gcard__visual .tpc-kh-gcard__label { flex: 1; }
.tpc-kh-gcard__meta { align-self: end; }
.tpc-kh-gcard[hidden] { display: none; }
.tpc-kh-gcard__visual { position: relative; }
.tpc-kh-gcard__frame {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 24px;
  overflow: hidden;
  background: var(--tpc-kh-tint-basics);
  transition: transform var(--primitive-duration-moderate) var(--primitive-easing-out),
              box-shadow var(--primitive-duration-moderate) var(--primitive-easing-out);
}
.tpc-kh-gcard:hover .tpc-kh-gcard__frame,
.tpc-kh-gcard:focus-within .tpc-kh-gcard__frame {
  transform: translateY(-6px) rotate(-0.6deg);
  box-shadow: 0 20px 40px rgba(34, 34, 34, 0.16);
}
.tpc-kh-gcard__frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* v3.0 - the label now sits UNDER the scene and tucks up over its
   bottom edge, instead of being pinned inside it. At a third of the
   stage width a two- or three-line question filled most of the frame
   and hid the 3D scene, which is the part that makes the tile fun. */
.tpc-kh-gcard__label {
  position: relative;
  z-index: 1;
  margin: -40px 12px 0;
  background: var(--primitive-white);
  border-radius: 16px;
  padding: 12px 14px;
  box-shadow: 0 8px 20px rgba(34, 34, 34, 0.1);
}
/* v3.7 - STATE TAGS, one colour each, from each one's OFFICIAL colours
   (founder: "each tag needs to be a different colour ... we don't have to
   use brand colours", the one place on the site outside the TPC palette).
   NATIONAL: Australia's national colours green and gold (proclaimed
     19 April 1984, pmc.gov.au). Gold #FFCD00 (Pantone 116) with a deep
     national green #005A2B: 5.60:1. The brighter Pantone 348 green
     #00843D on gold is only 3.20:1, too low for 11px type.
   VIC: Victoria's official navy, Pantone 541 #003C71, with white: 11.14:1.
     (Purple was the founder's guess; the state's proclaimed colours are
     navy blue and silver.)
   NSW: the state colour sky blue #87CEEB with NSW navy #002664: 8.25:1.
   TAS: Tasmania's bottle green #006A4E with white: 6.62:1.
   Filled pills, no outlines. */
.tpc-kh-gcard__kicker { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.tpc-kh-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.5;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--primitive-panel-grey);
  color: var(--primitive-asphalt);
}
.tpc-kh-tag[data-tag="national"] { background: #FFCD00; color: #005A2B; }
.tpc-kh-tag[data-tag="vic"]      { background: #003C71; color: #FFFFFF; }
.tpc-kh-tag[data-tag="nsw"]      { background: #87CEEB; color: #002664; }
.tpc-kh-tag[data-tag="tas"]      { background: #006A4E; color: #FFFFFF; }
.tpc-kh-drawer__tags .tpc-kh-tag { font-size: 11.5px; padding: 3px 10px; }

.tpc-kh-gcard__title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--primitive-asphalt);
  margin: 0;
  text-transform: none;
  text-wrap: balance;
}
.tpc-kh-gcard__open {
  font: inherit;
  color: inherit;
  text-align: left;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
.tpc-kh-gcard__open:focus-visible { outline: 3px solid var(--primitive-asphalt); outline-offset: 4px; border-radius: 4px; }
.tpc-kh-gcard__summary {
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--primitive-ink);
  margin: 4px 2px 0;
  text-wrap: pretty;
}
.tpc-kh-gcard__meta {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--primitive-asphalt);
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  padding-left: 2px;
}
.tpc-kh-gcard__meta .chev {
  color: var(--primitive-orange);
  transition: transform var(--primitive-duration-fast) var(--primitive-easing-out);
}
.tpc-kh-gcard:hover .tpc-kh-gcard__meta .chev { transform: translateX(3px); }

/* Per-topic tint behind each scene. */
.tpc-kh-gcard[data-topic="basics"]     .tpc-kh-gcard__frame { background: var(--tpc-kh-tint-basics); }
.tpc-kh-gcard[data-topic="plans"]      .tpc-kh-gcard__frame { background: var(--tpc-kh-tint-plans); }
.tpc-kh-gcard[data-topic="specialist"] .tpc-kh-gcard__frame { background: var(--tpc-kh-tint-specialist); }
.tpc-kh-gcard[data-topic="permits"]    .tpc-kh-gcard__frame { background: var(--tpc-kh-tint-permits); }
.tpc-kh-gcard[data-topic="turnaround"] .tpc-kh-gcard__frame { background: var(--tpc-kh-tint-turnaround); }

/* Hidden-until-JS full answer. The <noscript> override in <head> shows
   it, so no-JS visitors and crawlers get the complete text. */
.tpc-kh-gcard__full { display: none; }

/* ─────────────────────────────────────────────────────────────────────
   GLOSSARY - lesson 06. Each term is its own soft tile, like a flash
   card, so a beginner can scan the list instead of reading a wall.
   ───────────────────────────────────────────────────────────────────── */
.tpc-kh-topic .tpc-kh-glossary__eyebrow { display: none; }
.tpc-kh-glossary__head { margin-bottom: var(--primitive-space-5); }
.tpc-kh-glossary__title { font-size: 20px; font-weight: 800; color: var(--primitive-asphalt); margin: 0 0 6px; }
.tpc-kh-glossary__blurb { font-size: 15.5px; color: var(--primitive-ink); margin: 0; max-width: 62ch; }
.tpc-kh-glossary__body { font-size: 15.5px; line-height: 1.6; color: var(--primitive-ink); }
.tpc-kh-glossary__body > p { max-width: 70ch; }
.tpc-kh-glossary__body h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--primitive-asphalt);
  margin: var(--primitive-space-6) 0 var(--primitive-space-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.tpc-kh-glossary__body ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 0;
  list-style: none;
  margin: 0;
}
.tpc-kh-glossary__body li {
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--primitive-panel-grey);
}
.tpc-kh-glossary__body li strong { color: var(--primitive-asphalt); }
.tpc-kh-glossary__body a { color: var(--primitive-asphalt); text-decoration: underline; text-decoration-color: var(--primitive-orange); text-decoration-thickness: 2px; text-underline-offset: 2px; }

/* ─────────────────────────────────────────────────────────────────────
   DRAWER - opening a card reveals its answer here, not inline. Slides
   in from the right over a scrim. Esc closes; focus is trapped inside
   while open and returned to the trigger on close.
   ───────────────────────────────────────────────────────────────────── */
.tpc-kh-drawer {
  position: fixed;
  inset: 0;
  z-index: 200;
  visibility: hidden;
  pointer-events: none;
  /* v3.7 - hide only AFTER the closing fade has run. Before, visibility
     flipped to hidden the instant data-open came off, so the panel
     vanished mid-frame and the close looked like a cut, not a fade. */
  transition: visibility 0s linear var(--primitive-duration-moderate);
}
.tpc-kh-drawer[data-open] { transition-delay: 0s; }
.tpc-kh-drawer[data-open] { visibility: visible; pointer-events: auto; }

.tpc-kh-drawer__scrim {
  position: absolute;
  inset: 0;
  background: rgba(34, 34, 34, 0.45);
  opacity: 0;
  transition: opacity var(--primitive-duration-moderate) var(--primitive-easing-out);
}
.tpc-kh-drawer[data-open] .tpc-kh-drawer__scrim { opacity: 1; }

.tpc-kh-drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(560px, 92vw);
  background: var(--primitive-white);
  box-shadow: -24px 0 64px rgba(34, 34, 34, 0.2);
  transform: translateX(100%);
  transition: transform var(--primitive-duration-mid) var(--primitive-easing-out);
  display: flex;
  flex-direction: column;
}
.tpc-kh-drawer[data-open] .tpc-kh-drawer__panel { transform: translateX(0); }

.tpc-kh-drawer__close {
  position: absolute;
  top: var(--primitive-space-5);
  right: var(--primitive-space-5);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--primitive-panel-grey);
  color: var(--primitive-asphalt);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  z-index: 1;
}
.tpc-kh-drawer__close:hover { background: #E6E6E6; }

.tpc-kh-drawer__scroll {
  overflow-y: auto;
  padding: var(--primitive-space-8) var(--primitive-space-7) var(--primitive-space-8);
  flex: 1;
}
.tpc-kh-drawer__badge {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primitive-orange);
  margin: 0 0 10px;
}
.tpc-kh-drawer__title {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--primitive-asphalt);
  margin: 0 0 14px;
}
.tpc-kh-drawer__tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: var(--primitive-space-6); }
.tpc-kh-drawer__tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--primitive-panel-grey);
  color: var(--primitive-ink);
}
.tpc-kh-drawer__body { font-size: 16px; line-height: 1.65; color: var(--primitive-ink); max-width: 60ch; }
.tpc-kh-drawer__body p { margin: 0 0 1em; }
.tpc-kh-drawer__body h4 { font-size: 15px; font-weight: 700; color: var(--primitive-asphalt); margin: 1.2em 0 0.5em; }
.tpc-kh-drawer__body ul { margin: 0 0 1em; padding-left: 1.2em; }
.tpc-kh-drawer__body li { margin-bottom: 0.4em; }
.tpc-kh-drawer__body a {
  color: var(--primitive-asphalt);
  text-decoration: underline;
  text-decoration-color: var(--primitive-orange);
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
}
.tpc-kh-drawer__related {
  margin-top: var(--primitive-space-5);
  padding-top: var(--primitive-space-4);
  border-top: 1px solid rgba(34, 34, 34, 0.1);
}
.tpc-kh-drawer__related-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(34, 34, 34, 0.5);
  margin: 0 0 8px;
}
.tpc-kh-drawer__related ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.tpc-kh-drawer__related a { font-size: 14.5px; font-weight: 600; color: var(--primitive-asphalt); text-decoration: none; }
.tpc-kh-drawer__related a:hover { color: var(--primitive-orange); text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
  .tpc-kh-drawer__panel,
  .tpc-kh-drawer__scrim,
  .tpc-kh-gcard__frame { transition-duration: 0.01ms; }
}

/* ─────────────────────────────────────────────────────────────────────
   v3.0 READING VIEW - built for a first-time reader: the topic's number
   on the badge, dots for where this question sits in its topic (v3.1:
   position only, no read state), the
   locked one-line summary as a soft lead box before the full answer,
   bigger body type, and buttons on to the previous and next question
   carrying their own titles (no new labels).
   ───────────────────────────────────────────────────────────────────── */
/* v3.6 - CENTRED, not tucked in on the right (founder 2026-10-01). A
   floating reading card in the middle of the screen with even space all
   round, fading and settling up into place. Overrides the v2.0 right-
   hand sheet rules above. */
.tpc-kh-drawer__panel {
  top: var(--primitive-space-6);
  bottom: var(--primitive-space-6);
  left: 50%;
  right: auto;
  width: min(820px, calc(100vw - 48px));
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 40px 100px rgba(34, 34, 34, 0.35);
  opacity: 0;
  transform: translate(-50%, 28px) scale(0.97);
  /* closing: a quicker ease back down */
  transition: transform var(--primitive-duration-moderate) var(--primitive-easing-in-out),
              opacity var(--primitive-duration-moderate) var(--primitive-easing-in-out);
}
/* opening: a longer, softer settle */
.tpc-kh-drawer[data-open] .tpc-kh-drawer__panel {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
  transition: transform var(--primitive-duration-mid) var(--primitive-easing-out),
              opacity var(--primitive-duration-moderate) var(--primitive-easing-out);
}
.tpc-kh-drawer__inner { will-change: opacity, transform; }

/* The bar: badge, dot trail, close, always on screen above the answer. */
.tpc-kh-drawer__bar {
  flex: none;
  display: flex;
  align-items: center;
  gap: var(--primitive-space-5);
  padding: 18px 20px 16px max(clamp(28px, 5vw, 64px), calc((100% - 640px) / 2));
  border-bottom: 1px solid rgba(34, 34, 34, 0.08);
  position: relative;
  z-index: 2;
  background: var(--primitive-white);
}
.tpc-kh-drawer__bar .tpc-kh-drawer__badge { margin: 0; flex: none; }
.tpc-kh-drawer__bar .tpc-kh-drawer__close { position: static; margin-left: auto; flex: none; }
/* One 640px reading column, centred by the side padding rather than by
   per-child margins. v3.6's first pass centred each child separately, and
   the lead box's own margin and the body's 62ch cap overrode it, so the
   lead, title and body each started at a different left edge. */
.tpc-kh-drawer__scroll {
  padding-block: var(--primitive-space-7) var(--primitive-space-8);
  padding-inline: max(clamp(28px, 5vw, 64px), calc((100% - 640px) / 2));
}
.tpc-kh-drawer__scroll .tpc-kh-drawer__body { max-width: none; }
.tpc-kh-drawer__badge { display: flex; align-items: center; gap: 10px; }
.tpc-kh-drawer__badge-num {
  font-size: 12px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--primitive-orange);
  color: var(--primitive-asphalt);
}
/* Dot trail: one button per question in the topic. The visible bar is
   6px tall but the button is a 28 x 28 target so it is easy to hit; the
   question's own title appears in a small tip on hover and focus. */
.tpc-kh-drawer__dots { display: flex; gap: 2px; align-items: center; }
.tpc-kh-drawer__dot {
  position: relative;
  width: 32px;
  height: 28px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.tpc-kh-drawer__dot::before {
  content: '';
  position: absolute;
  left: 4px;
  right: 4px;
  top: 50%;
  height: 6px;
  margin-top: -3px;
  border-radius: 999px;
  background: rgba(34, 34, 34, 0.14);
  transition: background-color var(--primitive-duration-fast) var(--primitive-easing-out),
              transform var(--primitive-duration-fast) var(--primitive-easing-out);
}
.tpc-kh-drawer__dot:hover::before { background: rgba(34, 34, 34, 0.32); transform: scaleY(1.35); }
.tpc-kh-drawer__dot.is-here::before { background: var(--primitive-orange); }
.tpc-kh-drawer__dot:focus-visible { outline: 3px solid var(--primitive-asphalt); outline-offset: 1px; border-radius: 8px; }
.tpc-kh-drawer__tip {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  width: max-content;
  max-width: 260px;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--primitive-asphalt);
  color: var(--primitive-white);
  font-family: var(--primitive-font-family);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  text-align: left;
  white-space: normal;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -4px);
  transition: opacity var(--primitive-duration-fast) var(--primitive-easing-out),
              transform var(--primitive-duration-fast) var(--primitive-easing-out);
  z-index: 3;
}
.tpc-kh-drawer__dot:hover .tpc-kh-drawer__tip,
.tpc-kh-drawer__dot:focus-visible .tpc-kh-drawer__tip { opacity: 1; transform: translate(-50%, 0); }
.tpc-kh-drawer__title { font-size: 28px; text-wrap: balance; }
.tpc-kh-drawer__title:focus { outline: none; }
.tpc-kh-drawer__lead {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--primitive-asphalt);
  margin: 0 0 var(--primitive-space-6);
  padding: 18px 20px;
  border-radius: 18px;
  background: color-mix(in srgb, var(--primitive-orange) 12%, white);
  text-wrap: pretty;
}
.tpc-kh-drawer__lead:empty { display: none; }
.tpc-kh-drawer__body { font-size: 17px; line-height: 1.75; max-width: 62ch; }
.tpc-kh-drawer__body h4 { font-size: 18px; margin: 1.4em 0 0.5em; }
.tpc-kh-drawer__body p,
.tpc-kh-drawer__body li { text-wrap: pretty; }

.tpc-kh-drawer__steps { display: flex; gap: 12px; margin-top: var(--primitive-space-7); }
.tpc-kh-drawer__step {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 0;
  border-radius: 16px;
  background: var(--primitive-panel-grey);
  color: var(--primitive-asphalt);
  font-family: var(--primitive-font-family);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
  transition: background-color var(--primitive-duration-fast) var(--primitive-easing-out);
}
.tpc-kh-drawer__step[hidden] { display: none; }
.tpc-kh-drawer__step svg { flex-shrink: 0; }
/* v3.9 - white text on the orange CTA (founder: "all orange cta's need
   to be white", the site rule since homepage.css v6.85). */
.tpc-kh-drawer__step--next { justify-content: space-between; background: var(--primitive-orange); color: var(--primitive-white); }
.tpc-kh-drawer__step--next.is-topic { background: var(--primitive-asphalt); color: var(--primitive-white); }
.tpc-kh-drawer__step:hover { background: #E6E6E6; }
.tpc-kh-drawer__step--next:hover { background: #E08916; }
.tpc-kh-drawer__step--next.is-topic:hover { background: var(--primitive-ink); }
.tpc-kh-drawer__step:focus-visible { outline: 3px solid var(--primitive-asphalt); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  .kh-js .tpc-kh-topic[data-active] .tpc-kh-topic__head,
  .kh-js .tpc-kh-topic[data-active] .tpc-kh-gcard { animation: none; }
  .tpc-kh-gcard__frame,
  .tpc-kh-topic__next { transition-duration: 0.01ms; }
}

@media (max-width: 1024px) {
  .tpc-kh-panel.tpc-kh-learn { grid-template-columns: 1fr; gap: var(--primitive-space-6); padding: var(--primitive-space-6); }
  .tpc-kh-rail { position: static; }
  .tpc-kh-topic__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ─────────────────────────────────────────────────────────────────────
   THEA-800 - MOBILE PARITY PASS. The rail-above-stage stack (the
   @media 1024px block above) is fine as a reflow, but it exposed two
   genuine journey defects the stricter mobile-parity bar catches, both
   confirmed with real touch-emulated Chrome at 390px, not just eyeballed:

   1. DRAWER BAR OVERFLOW (see knowledge-hub.html's setTopic/renderDrawer).
      .tpc-kh-drawer__badge and .tpc-kh-drawer__dots are both flex:none,
      so on a narrow panel their combined natural width push
      .tpc-kh-drawer__close (also flex:none, margin-left:auto) straight
      past the bar's visible edge. Measured: bar clientWidth 342px,
      scrollWidth 507px, close button's left/right at 441/481px -
      genuinely outside the 342px-wide, overflow:hidden panel, so the X
      is invisible AND untappable on every topic with more than ~3
      dots (confirmed on "basics", 5 dots, and "plans", 5 dots; the
      desktop/tablet panel is wide enough this never happens there).
      Not a dropped moment, but a controls-you-cannot-reach regression:
      a touch visitor can still escape via the scrim, but the documented
      close affordance silently fails. Fixed by letting the badge title
      truncate and giving the dots their own small horizontal scroller,
      so the close button always has the room flex:none promised it.
   2. GLOSSARY 2-UP GRID. .tpc-kh-glossary__body ul never had a narrow-
      width override. At 390px each flash-card tile is ~165px wide, so
      a bolded multi-word term ("TMP (Traffic Management Plan)") wraps
      across 3 lines before the definition even starts - confirmed by
      screenshot, not a reflow default, the one piece of this page that
      reads as a cropped desktop layout rather than a page written for a
      phone. Single column at this width reads as the flash-card list it
      is meant to be.
   ───────────────────────────────────────────────────────────────────── */
@media (max-width: 699px) {
  .tpc-kh-drawer__bar { gap: var(--primitive-space-3); }
  .tpc-kh-drawer__bar .tpc-kh-drawer__badge {
    flex: 1 1 auto;
    min-width: 0;
  }
  /* The number pill keeps its size; only the title span truncates. */
  .tpc-kh-drawer__badge span:not(.tpc-kh-drawer__badge-num) {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
  }
  .tpc-kh-drawer__dots {
    flex: 0 1 auto;
    max-width: 30vw;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .tpc-kh-drawer__dots::-webkit-scrollbar { display: none; }
  .tpc-kh-drawer__bar .tpc-kh-drawer__close { flex: none; }

  .tpc-kh-glossary__body ul { grid-template-columns: 1fr; }
}

/* ─────────────────────────────────────────────────────────────────────
   SEARCH DROPDOWN - v3.4. Hangs 8px under the search pill in the same
   rounded, white, softly shadowed language, fades and settles in, and
   reads as part of the search rather than a separate panel. Each result
   carries its topic number (orange when highlighted, the same cue as the
   rail) so a beginner sees which lesson an answer belongs to.
   ───────────────────────────────────────────────────────────────────── */
.tpc-kh-suggest {
  position: absolute;
  z-index: 150;
  background: var(--primitive-white);
  border-radius: 22px;
  box-shadow: 0 24px 60px rgba(34, 34, 34, 0.22), 0 2px 6px rgba(34, 34, 34, 0.08);
  padding: 8px;
  max-height: min(440px, 62vh);
  overflow-y: auto;
  overscroll-behavior: contain;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity var(--primitive-duration-fast) var(--primitive-easing-out),
              transform var(--primitive-duration-fast) var(--primitive-easing-out);
}
.tpc-kh-suggest[hidden] { display: none; }
.tpc-kh-suggest.is-open { opacity: 1; transform: none; }
.tpc-kh-suggest__count {
  margin: 0;
  padding: 8px 12px 6px;
  font-size: 12.5px;
  color: rgba(65, 65, 66, 0.8);
}
.tpc-kh-suggest__count[hidden] { display: none; }
.tpc-kh-suggest__list { list-style: none; margin: 0; padding: 0; }
.tpc-kh-suggest__item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 14px;
  cursor: pointer;
  transition: background-color var(--primitive-duration-fast) var(--primitive-easing-out);
}
.tpc-kh-suggest__item[aria-selected="true"] { background: color-mix(in srgb, var(--primitive-orange) 13%, white); }
.tpc-kh-suggest__num {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  background: var(--primitive-panel-grey);
  color: var(--primitive-asphalt);
}
.tpc-kh-suggest__item[aria-selected="true"] .tpc-kh-suggest__num { background: var(--primitive-orange); }
.tpc-kh-suggest__text { display: block; min-width: 0; }
.tpc-kh-suggest__title { display: block; font-size: 15px; font-weight: 700; line-height: 1.3; color: var(--primitive-asphalt); }
.tpc-kh-suggest__topic { display: block; font-size: 12.5px; color: var(--primitive-ink); margin-top: 2px; }
.tpc-kh-suggest mark {
  background: color-mix(in srgb, var(--primitive-orange) 32%, white);
  color: inherit;
  border-radius: 3px;
  padding: 0 1px;
}
.tpc-kh-suggest__empty { margin: 0; padding: 14px; font-size: 14.5px; line-height: 1.5; color: var(--primitive-ink); }
.tpc-kh-suggest__empty[hidden] { display: none; }
.tpc-kh-suggest__empty a { color: var(--primitive-asphalt); text-decoration: underline; text-decoration-color: var(--primitive-orange); text-decoration-thickness: 2px; }
@media (prefers-reduced-motion: reduce) { .tpc-kh-suggest { transition-duration: 0.01ms; } }

/* ─────────────────────────────────────────────────────────────────────
   NO-RESULTS - search state, spans the grid.
   ───────────────────────────────────────────────────────────────────── */
.tpc-kh-noresults {
  grid-column: 1 / -1;
  text-align: center;
  font-size: 16px;
  color: var(--primitive-ink);
  padding: var(--primitive-space-7) 0;
}
.tpc-kh-noresults a { color: var(--primitive-asphalt); text-decoration: underline; text-decoration-color: var(--primitive-orange); }

/* ─────────────────────────────────────────────────────────────────────
   RED STRIP - byte-identical from services.css / about.css / contact.css.
   v3.3: back directly under the hero. v3.4: on this page it carries the
   knowledge base's four stats instead of the five trust items (founder).
   ───────────────────────────────────────────────────────────────────── */
.tpc-proof--strip {
  background: color-mix(in srgb, var(--primitive-signal-red) 76%, var(--primitive-asphalt));
  padding-block: clamp(14px, 1.8vh, 22px);
}
.tpc-proof--strip .tpc-proof__stat,
.tpc-proof--strip .tpc-proof__star,
.tpc-proof--strip .tpc-proof__label {
  color: color-mix(in srgb, var(--primitive-orange) 55%, var(--primitive-white));
}
.tpc-proof--strip .tpc-proof__item { gap: 2px; }
.tpc-proof--strip .tpc-proof__stat { font-size: clamp(20px, 1.9vw, 26px); }
.tpc-proof--strip .tpc-proof__stat--word { font-size: clamp(16px, 1.5vw, 20px); }
.tpc-proof--strip .tpc-proof__label { max-width: none; font-size: 12.5px; }
/* v3.5 - four stats on this page, not the strip's usual five, so the grid
   gets four equal columns; on five it left an empty fifth slot and sat
   the row visibly off-centre. */
.tpc-proof--kh .tpc-proof__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* THEA-904 - WordPress-only addition, not in the hi-fi. The shared
   foundation there is components.css, which carries one unscoped
   .tpc-visually-hidden; the WordPress theme has no such global rule
   (every other page - home.css/services-hub.css/contact.css/team.css/
   legal.css - ships its own page-scoped copy for the same reason), so
   the strip's screen-reader-only <h2> needs one here too. */
.tpc-proof--kh .tpc-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ─────────────────────────────────────────────────────────────────────
   v3.9 - CLOSE BAND (founder 2026-10-01: "need more padding between
   'Can't find your answer?' and the body copy also the body copy needs to
   be white"). homepage.css sets the title's margin to 0 and the lead to
   the band's asphalt body colour; this page gives the lead space-5
   (24px) above it and white text. White on this orange measures 2.31 to
   3.2:1 across the gradient, under AA for 18px body copy, recorded here
   as the founder's call, the same one made for orange CTAs.
   ───────────────────────────────────────────────────────────────────── */
.tpc-close .tpc-close__lead {
  margin-top: var(--primitive-space-5);
  color: var(--primitive-white);
}


/* ─────────────────────────────────────────────────────────────────────
   FOUNDER 2026-10-22: "across the entire website all text needs to be
   centred for mobile."

   This block lives HERE rather than only in homepage.css because of cascade
   ORDER, not specificity: every page links homepage.css first and its own
   sheet second, so a page-level `text-align: left` beats a sitewide rule of
   equal specificity no matter how the sitewide one is written. Verified on
   team.html, where the heading still computed `start` with the sitewide rule
   in place.

   Scope confirmed with the founder: marketing and content sections centre;
   long-form legal, blog post bodies and form fields stay left, because
   centring a 1,700-word document removes the left edge that clause-scanning
   depends on. Phone only - desktop is client-approved and frozen.
   ───────────────────────────────────────────────────────────────────── */
@media (max-width: 699px) {
  .band__inner, .band__inner h1, .band__inner h2, .band__inner h3,
  .band__inner p, .band__inner li,
  .tpc-sec, .tpc-section-head, .tpc-showcase__tile, .tpc-showcase__copy {
    text-align: center;
  }
  /* Carve-outs: these read worse centred. NOTE the doubled class - the
     obvious `.tpc-post__content *` is specificity (0,1,0) and LOSES to the
     `.band__inner p` above at (0,1,1), which is how the blog post body ended
     up centred on the first attempt. Doubling the class lifts each carve-out
     to (0,2,x) so it wins without resorting to !important. */
  .tpc-post__content.tpc-post__content,
  .tpc-post__content.tpc-post__content *,
  .tpc-legal-content.tpc-legal-content,
  .tpc-legal-content.tpc-legal-content *,
  .request-form-page .field.field,
  .request-form-page .field.field *,
  .request-form-page .field__label.field__label,
  .request-form-page .field__hint.field__hint,
  .request-form-page .form-row.form-row { text-align: left; }
}
/* ═════════════════════════════════════════════════════════════════════
   MOBILE KNOWLEDGE HUB
   Founder 2026-10-22: "the knowledge hub for mobile needs a complete
   redesign to look and feel like the desktop knowledge hub for desktop".

   THE PREVIOUS MOBILE PASS (the THEA-800 block above) fixed the drawer bar
   and the glossary but stopped at the two defects it had evidence for. The
   stage grid and the hero search were never looked at below 1024px, and at
   390px both are genuinely broken rather than merely tight:

   1. THE ARTICLE GRID IS STILL 2-UP. Line 878 drops .tpc-kh-topic__grid
      from three columns to two at 1024px and there is no narrower step, so
      at 390px each card is about 165px wide. Measured on the live page:
      "Who's who: planner, controller and implementer" sets over FIVE lines
      and its summary over seven, the white label runs past the card it
      belongs to, and an odd card count leaves a half-empty row. It is the
      same cropped-desktop-layout failure the glossary note above describes,
      one component over.

   2. THE SEARCH PLACEHOLDER IS CLIPPED AT BOTH ENDS. text-align inherits
      into a form control, so the sitewide mobile centring rule
      (blog.css / homepage.css, `.band__inner ... { text-align: center }`)
      centres the text inside #tpc-kh-search. A placeholder wider than the
      field then overflows BOTH edges and is cut mid-word at the left as
      well as the right, which reads as a broken field rather than a long
      hint. Left-aligning the control is the carve-out those sitewide
      blocks already make for form fields in request-forms.

   The cards are given the same compact mobile treatment the blog archive
   cards get (blog.css, same founder note): 16:9 frame, tighter label tuck,
   two-line summary. The design language is unchanged - tucked white label,
   coloured state pill, orange chevron - only the measurements drawn for a
   3-up desktop row are redrawn for one mobile column.

   DESKTOP IS UNTOUCHED: everything is inside the query.
   ═════════════════════════════════════════════════════════════════════ */
@media (max-width: 699px) {

  /* ---- 1. one column, compact cards -------------------------------- */
  .tpc-kh-topic__grid { grid-template-columns: 1fr; }

  .tpc-kh-topic__grid .tpc-kh-gcard { row-gap: 8px; }
  .tpc-kh-topic__grid .tpc-kh-gcard__frame { aspect-ratio: 16 / 9; border-radius: 18px; }
  .tpc-kh-topic__grid .tpc-kh-gcard__label {
    margin: -28px 8px 0;
    padding: 10px 12px;
    border-radius: 14px;
  }
  .tpc-kh-topic__grid .tpc-kh-gcard__kicker { margin-bottom: 4px; justify-content: center; }
  .tpc-kh-topic__grid .tpc-kh-gcard__title { font-size: 15.5px; }
  /* See blog.css for why this needs the -webkit-box display as well as
     the clamp. The full summary stays in the DOM. */
  .tpc-kh-topic__grid .tpc-kh-gcard__summary {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
  }

  /* The title button and the "Read article" row are the two card parts
     that carry their own text-align (the button's `text-align: left` at
     line 494 is there so a wrapped title lines up under itself inside a
     narrow desktop column, and the meta row is an inline-flex). Both sit
     above the sitewide mobile centring rule's reach, so without this the
     card had a centred pill and summary around a left-aligned title and
     CTA. The blog archive's cards centre throughout; these now match. */
  .tpc-kh-topic__grid .tpc-kh-gcard__open { text-align: center; }
  .tpc-kh-topic__grid .tpc-kh-gcard__meta { justify-content: center; }

  /* ---- 2. the search field reads left to right --------------------- */
  .tpc-kh-hero__search-input.tpc-kh-hero__search-input { text-align: left; }

  /* ---- the open topic's heading -------------------------------------
     .tpc-kh-topic__head is a two-column grid: a 72px medallion beside the
     title. At 390 that leaves the title 246px, so "Traffic Management
     Basics" set over three lines - centred inside its own column, which
     put it visibly off-centre against the rest of the page. Stacked, the
     medallion sits on its own line and the title gets the full width.
     ------------------------------------------------------------------ */
  .tpc-kh-topic__head {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: var(--primitive-space-4);
    margin-bottom: var(--primitive-space-5);
  }
  .tpc-kh-topic__num { width: 60px; height: 60px; font-size: 24px; border-radius: 18px; }
  .tpc-kh-topic__title { font-size: clamp(22px, 7vw, 28px); }
  .tpc-kh-topic__blurb { font-size: 15.5px; }

  /* ---- the topic rail ----------------------------------------------
     At 390 the row's 44px medallion, 14px gaps and count pill leave the
     title about 212px, so "Traffic Management Basics" broke over three
     lines. A 36px medallion and 10px gaps hand the title back 20px and
     it sets on two.
     ------------------------------------------------------------------ */
  .tpc-kh-rail__link { grid-template-columns: 36px minmax(0, 1fr) auto; gap: 10px; padding: 12px; }
  .tpc-kh-rail__num { width: 36px; height: 36px; font-size: 14px; }
  .tpc-kh-rail__blurb { font-size: 12.5px; }

  /* ---- drawer stepper tooltip - driven-device finding -----------------
     `.tpc-kh-drawer__tip` centres itself under each progress dot
     (`left:50%; transform:translate(-50%,...)`), which is fine with a
     mouse but on a real phone a tap can stick the `:hover` state (iOS
     Safari's well-known sticky-hover quirk) and the tip for a dot near
     either end of the stepper then renders with its centred 260px box
     reaching past the 390px viewport. `overflow-x: clip` on `html`
     (homepage.css) clips it rather than adding a scrollbar, so
     `scrollWidth` reads a clean 390 and the overflow is invisible to a
     static measurement - only driving the drawer and tapping an edge dot
     shows the clipped label. Each dot already carries its own
     `aria-label` with the same text, so the visual tip is a sighted-mouse
     nicety with no touch/screen-reader loss from turning it off here. */
  .tpc-kh-drawer__tip { display: none; }
}

/* ═════════════════════════════════════════════════════════════════════
   FOUNDER 2026-11-05: "we need to redesign the knowledge hub for mobile,
   from a user experience perspective it does not carry the same
   experience as the desktop does."

   WHAT DESKTOP ACTUALLY GIVES YOU, measured at 1440x900: a 300px rail on
   the left listing all six topics at once, sticky, beside the chosen
   topic's articles laid out three across. Two things at the same time, an
   index you can act on and the content it points at. The whole page is
   2,731px.

   WHAT MOBILE GAVE YOU, measured at 393x852: the same rail stacked ABOVE
   the content as six full-width centred blocks, about 600px of list to
   scroll past before the first article, then that topic's articles in a
   single column one per screen. 5,491px. The index stopped being an index
   the moment you used it: picking topic 4 scrolled you past the rail, and
   changing your mind meant scrolling back up through the articles to find
   it again. Nothing was broken, which is why earlier passes left it, and
   it still read as a list of lists rather than a hub.

   TWO CHANGES, both using patterns already on this site rather than new
   ones:

   1. THE RAIL BECOMES A CHIP ROW. Horizontally scrollable, one line, the
      number and title only. The blurbs are the first thing to go: they
      earn their place in a 300px column you read down, and on a phone
      they are what turns six items into 600px. Six chips at about 56px
      tall replace it, so the index costs one row instead of a screen and
      a half, and the articles start immediately under it.

   2. THE ARTICLE GRID BECOMES A SWIPE CAROUSEL. Same mechanism as the
      homepage card rows and the About key points: native scroll-snap, one
      card in frame and centred per the founder's 2026-10-22 ruling, dots
      underneath. A five-article topic is one card tall rather than five.

   `justify-content: start` is set explicitly on both rows, not left to
   default. It cost an hour on the About carousel: a centred track in a
   narrow scrollport puts half the row where nothing can scroll to it, and
   scrollWidth comes back short rather than wrong-looking.

   WHAT THIS DOES NOT DO, stated rather than left to be noticed: the chip
   row is not sticky, so the index is at the top of the panel rather than
   permanently on screen the way the desktop rail is. Sticking it would
   put the chips under the floating logo and hamburger, which sit over the
   content at this width by the founder's own "no header block" ruling.
   Worth doing as its own change with somewhere for those controls to go.
   ═════════════════════════════════════════════════════════════════════ */
@media (max-width: 699px) {
  /* ── 0. LET THE COLUMNS SHRINK ───────────────────────────────────── */
  /* Both rows below are horizontal scrollers, and a scroller's intrinsic
     width is the width of everything inside it. `.tpc-kh-learn` is a grid
     whose `1fr` is really `minmax(auto, 1fr)`, and `auto` floors at the
     item's min-content size, so the rail and the stage were sized to
     their own content instead of the screen: measured at 393px, the chip
     row and the article row both came back 1,467px wide, with the cards
     1,467px each and the first one starting 56px in. The page did not
     scroll sideways only because an ancestor clips, which is exactly the
     kind of silent breakage `overflow-x: clip` hides.
     `min-width: 0` is what allows a grid item to shrink below its content
     and lets the scroller take the column's width instead. */
  .tpc-kh-panel.tpc-kh-learn > *,
  .tpc-kh-rail,
  .tpc-kh-rail__list,
  #tpc-kh-stage,
  .tpc-kh-topic,
  .tpc-kh-topic__grid { min-width: 0; }

  /* ── 1. THE RAIL AS A CHIP ROW ───────────────────────────────────── */
  .tpc-kh-rail__list {
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    justify-content: start;
    align-items: stretch;
    gap: 8px;
    overflow-x: auto;
    overflow-y: visible;
    overscroll-behavior-x: contain;
    /* FOUNDER 2026-11-05: "for the browse topic carousel when i swipe it
       should land centre to the next tag not like this."
       It was `proximity`, which lets the browser decline to snap at all:
       a flick just coasted on momentum and stopped wherever it ran out,
       which is the half-chip-either-side state the founder photographed.
       `mandatory` makes every rest position a snap position, so a swipe
       always settles with a chip centred. The chips carry
       `scroll-snap-align: center` already. */
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    /* THE STRIP BLEEDS TO THE PANEL'S EDGES, not the screen's.

       It needs to bleed at all because the panel's 32px padding leaves
       281px of row and "Traffic Management Basics" is a 240px chip
       nowrap: exactly one chip fitted, so the strip read as a single
       highlighted item rather than the first of six, with nothing to say
       the row moved.

       FOUNDER 2026-11-05 on the first attempt, which bled to the VIEWPORT:
       "the browse topics buttons looks weird being positioned above the
       tile." Correct - the panel is a 345px white card inset 24px with a
       32px radius, so a viewport-wide strip ran the chips out past the
       card on both sides and they stopped looking like part of it.
       Bleeding by exactly the panel's own padding instead keeps the strip
       inside the card, chip 01 still aligned with the copy under it, and
       the next chip visible at the card's edge rather than the screen's.
       The article row needs no such cue because it has dots under it. */
    margin-inline: calc(-1 * var(--primitive-space-6));
    padding: 0 var(--primitive-space-6) 6px;
    scroll-padding-inline: var(--primitive-space-6);
  }
  .tpc-kh-rail__list::-webkit-scrollbar { display: none; }
  .tpc-kh-rail__list > li { scroll-snap-align: center; }

  .tpc-kh-rail__link {
    grid-template-columns: auto auto auto;
    align-items: center;
    gap: 9px;
    /* FOUNDER 2026-11-05: "the plans and schemes button needs to be
       centred." The chip's contents were not centred in their own pill:
       padding ran 9px on the left against 13px on the right, because the
       left end starts with a filled 28px numeral badge and I had tightened
       its side by eye. Measured, that put the row 4px off centre in every
       chip, and it reads worst on the shorter labels where there is least
       else to look at. Equal padding both ends, and the number badge keeps
       its weight without stealing the alignment. */
    padding: 9px 11px;
    border-radius: 999px;
    background: var(--primitive-panel-grey);
    white-space: nowrap;
  }
  .tpc-kh-rail__num { width: 28px; height: 28px; font-size: 12.5px; }
  .tpc-kh-rail__title { font-size: 14px; }
  /* the blurbs are what make six items 600px tall on a phone */
  .tpc-kh-rail__blurb { display: none; }
  .tpc-kh-rail__count { font-size: 12px; }

  /* ── 2. THE ARTICLE GRID AS A SWIPE CAROUSEL ─────────────────────── */
  .tpc-kh-topic__grid {
    display: grid;
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 100%;
    justify-content: start;
    align-items: start;
    gap: 14px;
    overflow-x: auto;
    overflow-y: visible;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding: 4px 0 12px;
  }
  .tpc-kh-topic__grid::-webkit-scrollbar { display: none; }
  .tpc-kh-topic__grid > * {
    scroll-snap-align: center;
    min-width: 0;
  }
}

/* ─────────────────────────────────────────────────────────────────────
   AND THE TOPIC HEAD STOPS REPEATING THE CHIP.

   Measured at 393px with the chip row in: the head below it was 222px of
   a 60px orange "01" badge, the topic title and its blurb, directly under
   a chip that already says 01 and the same title. On desktop that head
   earns its size, because the rail beside it is a compact 300px column of
   small type and the head is what gives the chosen topic weight. On a
   phone the chip IS the heading, and the head repeated it at full size
   before a single article.

   The badge goes, not the words: `.tpc-kh-topic__num` is a decorative
   numeral the chip already carries, while the <h2> title and its blurb
   stay exactly as written, which keeps the heading structure and the
   copy intact. The title drops to the chapter scale so it reads as "this
   is the topic you picked" rather than as the page's own headline.
   ───────────────────────────────────────────────────────────────────── */
@media (max-width: 699px) {
  .tpc-kh-topic__head {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
    margin-bottom: var(--primitive-space-5);
  }
  .tpc-kh-topic__num { display: none; }
  .tpc-kh-topic__title { font-size: clamp(20px, 5.6vw, 24px); }
}

/* ─────────────────────────────────────────────────────────────────────
   FOUNDER 2026-11-05: "the plans and schemes button needs to be centred",
   then "the buttons are still not centred on mobile."

   I fixed the wrong thing first. The founder meant THIS button, the
   "next topic" CTA at the end of each topic, which carries the next
   topic's number and title ("02 Plans & Schemes") and so reads as the
   Plans & Schemes button. The chip of the same name was already centred;
   this was 29px left of centre.

   Same mechanism as the article's date line earlier today: the parent
   carries `text-align: center` from the sitewide phone rule, and the
   button is a block-level FLEX container. text-align centres inline
   content inside a box; it cannot move the box itself. `margin-inline`
   is the property that does.

   Phone only. On desktop the topic column is left-aligned by design and
   this button sits with it.
   ───────────────────────────────────────────────────────────────────── */
@media (max-width: 699px) {
  .tpc-kh-topic__next { margin-inline: auto; }
}
