/* faq.kidultverse.com: one stylesheet, system fonts, no external requests.
   Contrast (WCAG 2.x, computed from these tokens; tests/styles.test.mjs re-checks them):
     --text  on --bg 17.40  on --bg-soft 16.25     --muted on --bg 6.39  on --bg-soft 5.96
     --field-border on --bg 4.54 (UI component, needs 3.0)
     white on --accent 3.31: passes only as LARGE text (>= 24px, or >= 18.66px bold), so the one
     place the accent carries text, the search button, is set at 20px / 700. Never use --accent
     as a text colour or behind smaller text. */
:root {
  color-scheme: light; /* no dark mode in v1: keep form controls and UA chrome light too */
  --accent: #ff4e00; --accent-ink: #ffffff;
  --text: #1a1a1a; --muted: #5f5f5f; --line: #e6e6e6; --field-border: #767676; --bg: #ffffff; --bg-soft: #f7f7f7;
  --link: #1a1a1a; --focus: 2px solid #1a1a1a;
  --measure: 72ch; --radius: 10px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.55; font-size: 1rem; }
a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: var(--focus); outline-offset: 2px; }
main:focus { outline: none; } /* skip-link target only: focused by script-free fragment jump, not an interactive control */
.wrap { width: min(100% - 32px, 1040px); margin-inline: auto; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -48px; z-index: 10; background: var(--text); color: #fff; padding: 8px 12px; border-radius: 6px; }
.skip:focus { top: 8px; }
.muted { color: var(--muted); }
.empty { color: var(--muted); padding: 16px; border: 1px dashed var(--field-border); border-radius: var(--radius); }
.plain { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; }

.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; }
.brand { font-weight: 700; text-decoration: none; font-size: 1.1rem; }
.brand span { color: var(--muted); font-weight: 500; }
.site-header nav a { font-size: .95rem; }
.site-footer { border-top: 1px solid var(--line); margin-top: 48px; padding: 20px 0 32px; font-size: .95rem; }
.site-footer p { margin: 0 0 6px; }
main { padding: 24px 0; min-height: 60vh; }
h1 { font-size: clamp(1.6rem, 2.2vw + 1rem, 2.2rem); line-height: 1.2; margin: 0 0 16px; overflow-wrap: break-word; }
h2 { font-size: 1.25rem; margin: 32px 0 12px; }
.lead { color: var(--muted); max-width: var(--measure); }

.hero { padding: 24px 0 8px; }
.search { display: flex; gap: 8px; max-width: 640px; }
.search input { flex: 1; font: inherit; color: var(--text); background: var(--bg); padding: 12px 14px; border: 1px solid var(--field-border); border-radius: var(--radius); min-width: 0; }
.search input::placeholder { color: var(--muted); opacity: 1; }
/* The only accent-on-white-text pairing: 3.31:1 is valid for large text only, hence 20px bold. */
.search button { font: inherit; font-size: 1.25rem; font-weight: 700; padding: 10px 20px; border: 0; border-radius: var(--radius); background: var(--accent); color: var(--accent-ink); cursor: pointer; }
.search button:hover { filter: brightness(.92); }

.category-grid { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 20px; }
.category-card { display: block; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; background: var(--bg-soft); }
.category-card:hover { border-color: var(--accent); }
.category-card:hover h3 { text-decoration: underline; text-underline-offset: 2px; }
.category-card h3 { margin: 0 0 6px; font-size: 1.05rem; }
.category-card p { margin: 0 0 10px; color: var(--muted); font-size: .95rem; }
.category-card .count { font-size: .875rem; color: var(--muted); }

.crumbs ol { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 6px; font-size: .9rem; color: var(--muted); }
.crumbs li:not(:last-child)::after { content: "›"; content: "›" / ""; margin-left: 6px; } /* trails its item so a wrapped line never starts with it; the second declaration keeps it silent to screen readers where supported */
.article-list { list-style: none; padding: 0; margin: 0; }
.article-list li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.article-list a { font-weight: 600; overflow-wrap: anywhere; }
.article-list p { margin: 4px 0 0; color: var(--muted); font-size: .95rem; }

.article { max-width: var(--measure); }
.answer { overflow-wrap: break-word; }
.answer p, .answer ul, .answer ol { margin: 0 0 1em; }
.answer h2, .answer h3, .answer h4 { margin: 1.4em 0 .5em; }
.answer li { margin-bottom: .35em; }
.collections { margin-top: 20px; }
.back { margin-top: 28px; }

.related { margin-top: 36px; }
/* The scroll container clips on all four sides, which would cut the 4px focus ring (2px + 2px offset) of the
   first, last and top cards. 6px of padding clears it; the matching negative margins keep the layout where it was. */
.product-row { display: flex; gap: 14px; overflow-x: auto; padding: 6px 6px 8px; margin: -6px -6px 0; scroll-padding-inline: 6px; scroll-snap-type: x mandatory; }
.product-card { flex: 0 0 180px; scroll-snap-align: start; display: flex; flex-direction: column; gap: 6px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; }
.product-card:hover .title { text-decoration: underline; text-underline-offset: 2px; }
.product-card img { width: 100%; height: 160px; object-fit: contain; background: var(--bg-soft); border-radius: 6px; }
.product-card .title { font-size: .95rem; font-weight: 600; overflow-wrap: anywhere; }
.product-card .price { font-size: .9rem; color: var(--muted); } /* "Sold out" and the price are words, never colour alone */

/* One column up to 640px; two-column category grid above; product cards wrap instead of scrolling. */
@media (min-width: 641px) {
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .product-row { flex-wrap: wrap; overflow: visible; }
  .product-card { flex-basis: calc(25% - 11px); }
}
@media (max-width: 480px) {
  .search { flex-direction: column; }
  .search input { flex: none; width: 100%; }
  .site-header .wrap { flex-wrap: wrap; }
}
@media (forced-colors: active) { .search button { border: 1px solid ButtonText; } }
