/* C&T: category chips on archive pages and the 404 page (Meg, 4 Oct 2026). Loaded after the theme styles; Additional CSS still loads last. */
/* ---------- category chips on archive pages, no search (Meg, 4 Oct 2026) ---------- */
body.archive #content > .container > h1:has(+ .ct-chips) { margin-bottom: 32px; }
.ct-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 48px; }
.ct-chips a { display: inline-flex; align-items: center; min-height: 48px; padding: 0 20px; border: 2px solid #282a6c; background: #fff; color: #282a6c; font-size: 14px; font-weight: 700; letter-spacing: .04em; line-height: 1.2; text-decoration: none; }
.ct-chips a:is(:hover, :focus-visible) { background: #faea9f; color: #282a6c; }
.ct-chips a[aria-current="page"] { background: #282a6c; color: #fff; }
.ct-chips a:focus-visible, .ct-404 a:focus-visible { outline: 3px solid #ffd15a; outline-offset: 2px; }
@media (max-width: 640px) { .ct-chips { margin-bottom: 32px; } .ct-chips a { padding: 0 16px; font-size: 13px; } }

/* ---------- 404 page (Meg, 4 Oct 2026): navy band like the archives, three ways on, latest posts, search ---------- */
body.error404:has(.ct-404) #content { margin-top: 0; }
body.error404:has(.ct-404) #masthead { background-color: #282a6c; }
body.error404:has(.ct-404) #masthead li a { color: #fff; }
body.error404:has(.ct-404) .site-branding img { filter: invert(1) grayscale(1) brightness(10); }
@media (min-width: 1100px) { body.error404 #content > .container.ct-404 { max-width: 1400px; } }
.ct-404 > h1 { margin: 0 0 40px; padding: 168px 0 clamp(48px, 6vw, 80px); color: #fff; border-image: conic-gradient(#282a6c 0 0) fill 0 / / 0 100vmax; font-size: clamp(44px, 6.4vw, 96px); line-height: .98; letter-spacing: -.02em; text-wrap: balance; }
.ct-404 > h1::after { content: ""; display: block; width: 72px; height: 6px; margin-top: 28px; background: #faea9f; }
.ct-404-line { max-width: 60ch; margin: 0 0 32px; font-size: 20px; line-height: 1.5; color: #282a6c; }
.ct-404-ways { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 88px; }
.ct-404-ways a { display: inline-flex; align-items: center; min-height: 48px; padding: 0 24px; border: 2px solid #282a6c; background: #282a6c; color: #fff; font-size: 14px; font-weight: 700; letter-spacing: .04em; text-decoration: none; }
.ct-404-ways a:is(:hover, :focus-visible) { background: #faea9f; color: #282a6c; }
.ct-404-sub { margin: 0 0 24px; font-size: clamp(24px, 3vw, 32px); line-height: 1.15; color: #282a6c; text-transform: none !important; letter-spacing: normal; }
.ct-404 .posts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 56px 32px; margin: 0; }
.ct-404 .posts .card > a { display: flex; flex-direction: column; height: 100%; border: 0; color: #282a6c; text-decoration: none; }
.ct-404 .posts .card .img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; margin: 0 0 20px; border-radius: 0; transition: box-shadow .25s ease; }
.ct-404 .posts .card a:hover .img { box-shadow: 10px 10px 0 #faea9f; }
.ct-404 .posts .card h4 { margin: 0 0 10px; font-size: 20px; line-height: 1.25; color: #282a6c; text-wrap: balance; }
.ct-404 .posts .card a:hover h4 { text-decoration: underline; text-decoration-color: #ffd15a; text-decoration-thickness: 3px; text-underline-offset: 4px; }
.ct-404 .posts .card .excerpt p { margin: 0; font-size: 15px; line-height: 1.55; color: #5b5d8c; }
.ct-404 .posts .card .inner::after { content: "Read →"; display: inline-block; margin-top: 14px; padding-bottom: 2px; border-bottom: 3px solid #ffd15a; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #282a6c; }
.ct-404-search { max-width: 560px; margin: 88px 0 120px; }
.ct-404-search form { display: flex; gap: 8px; }
.ct-404-search label { display: contents; }
.ct-404-search .search-submit { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.ct-404-search .search-submit svg { fill: currentColor; }
.ct-404-search :is(input[type="search"], input[type="text"]) { flex: 1 1 auto; min-width: 0; box-sizing: border-box; width: 100%; height: 48px; margin: 0; padding: 0 16px; border: 2px solid #282a6c; border-radius: 0; background: #fff; color: #282a6c; font-family: Lexend, sans-serif; font-size: 15px; }
.ct-404-search :is(input[type="submit"], button) { height: 48px; padding: 0 24px; border: 2px solid #282a6c; border-radius: 0; background: #282a6c; color: #fff; font-size: 14px; font-weight: 700; cursor: pointer; }
.ct-404-search :is(input[type="submit"], button):is(:hover, :focus-visible) { background: #faea9f; color: #282a6c; }
@media (max-width: 1000px) { .ct-404 .posts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .ct-404 > h1 { padding-top: 132px; margin-bottom: 28px; font-size: clamp(30px, 8.6vw, 44px); }
  .ct-404-line { font-size: 17px; }
  .ct-404-ways { flex-direction: column; margin-bottom: 64px; }
  .ct-404-ways a { justify-content: center; }
  .ct-404 .posts { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .ct-404-search { margin: 64px 0 88px; }
}
