/* ============================================================
   KITforge Labs - OFFICIAL BRAND LAYER (decided 2026-11-02, palette redefined 2026-11-03)
   Single source of the palette for the site. Loaded after
   site-pages.css on every front-end page. Remove this file and
   its two enqueue lines to return to the previous look.
   Primary  #FD6077  coral  : accents, rules, logo letters, Games band
   Secondary #0067BF blue   : fills, Tools band, active states
   Background #051545       : page / window background
   Accent   #FEFF00  yellow : highlights, hover, active link, positive state
   Accent 2 #8ADD7F  green  : second accent (owner 2026-11-05; first use: the LED ticker)
   Text on dark: cream #F0E7D5 (headlines), #E8E8E8 (body)
   ============================================================ */
:root {
  --kf-brand-primary: #FD6077;
  --kf-brand-secondary: #0067BF;
  --kf-brand-background: #051545;
  --kf-brand-accent: #FEFF00;
  --kf-brand-accent-2: #8ADD7F;
  --kf-brand-text: #F0E7D5;
  --kf-brand-text-soft: #E8E8E8;
  --kf-brand-line: rgba(240, 231, 213, 0.18);
  --kf-brand-surface: #142333;
}

/* ---------- Pit Crew pages: Home, Tools, Games, Contact ---------- */
body.kit-custom-template {
  --wp--preset--color--kit-ink: var(--kf-brand-text-soft);
  --wp--preset--color--kit-green: var(--kf-brand-primary);
  --kit-line: var(--kf-brand-primary);
  background-color: var(--kf-brand-background) !important;
  background-image: none !important;
  color: var(--kf-brand-text-soft);
}

/* Header (block part .kit-contact-header) */
body.kit-custom-template .kit-contact-header a,
body.kit-custom-template .kit-contact-header .wp-block-navigation-item__content { color: var(--kf-brand-text-soft) !important; }
body.kit-custom-template .kit-contact-header .wp-block-navigation-item__content:hover,
body.kit-custom-template .kit-contact-header .wp-block-navigation-item__content:focus-visible,
body.kit-custom-template .kit-contact-header .current-menu-item > .wp-block-navigation-item__content,
body.kit-custom-template .kit-contact-header [aria-current="page"] { color: var(--kf-brand-accent) !important; }
body.kit-custom-template .kit-contact-header::before { border-bottom-color: var(--kf-brand-primary) !important; }
body.kit-custom-template .kit-contact-header .kit-language-switcher { color: var(--kf-brand-text-soft); }

/* Language switcher dropdown + skip link */
body.kit-custom-template .kit-language-switcher__menu { background-color: var(--kf-brand-surface) !important; border-color: var(--kf-brand-primary) !important; box-shadow: 0 0.7rem 1.4rem rgba(0, 0, 0, 0.45) !important; }
body.kit-custom-template .kit-language-switcher__chevron { border-left-color: var(--kf-brand-text-soft) !important; }
body.kit-custom-template .kit-language-switcher__menu a,
body.kit-custom-template .kit-language-switcher__menu a span { color: var(--kf-brand-text-soft) !important; }
body.kit-custom-template .skip-link { color: var(--kf-brand-text); }

/* Rasters keep their original PNG files. They are recoloured at render time by two
   SVG colour-map filters (defined inline in parts/footer-editor.html):
   #kf-brand-map  orange -> gold, dark green -> navy, cream -> cream (stripes, tracks)
   #kf-logo-map   orange -> gold, dark green -> cream (logo, checker flag) */
body.kit-custom-template .kit-contact-brand img { filter: url(#kf-logo-map); }
/* Accent green on small graphic marks: checker flags, arrows, icons, markers (#kf-accent = flat colour, keeps alpha) */
body.kit-custom-template .kit-contact-header::after,
body.kit-custom-template .kit-site-footer::after { filter: url(#kf-accent); }
body.kit-custom-template .kit-site-footer__icon { filter: url(#kf-accent) !important; opacity: 1 !important; }
body.kit-custom-template .kit-language-switcher__chevron { border-left-color: var(--kf-brand-accent) !important; }
body.kit-custom-template .kit-tools-browser .kit-page-button span { color: var(--kf-brand-accent); }
body.kit-custom-template .kit-showcase-gallery__dots button[aria-current="true"] { background-color: var(--kf-brand-accent) !important; }
body.kit-custom-template .kit-tools-browser__list-scroll span { filter: url(#kf-accent); }
body.kit-custom-template .kit-home-band__track-tail img,
body.kit-custom-template .kit-contact-backdrop img { filter: url(#kf-brand-map); }

/* Presets and tokens: orange role -> gold, dark-green role -> navy */
body.kit-custom-template {
  --wp--preset--color--kit-orange: var(--kf-brand-primary);
  --kit-orange: var(--kf-brand-primary);
  --kit-green: var(--kf-brand-secondary);
}

/* Track swooshes drawn as a background of the Tools/Games hero and handoff band are lifted
   into a filterable ::after layer (the grain stays on the element itself). */
body.kit-custom-template .kit-tools-browser__hero,
body.kit-custom-template .kit-tools-games-link {
  position: relative;
  background-image: var(--kit-grain) !important;
  background-position: center !important;
  background-repeat: repeat !important;
  background-size: 56rem !important;
}
body.kit-custom-template .kit-tools-browser__hero::after,
body.kit-custom-template .kit-tools-games-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background-position: right bottom;
  background-repeat: no-repeat;
  background-size: auto 100%;
  filter: url(#kf-brand-map);
  pointer-events: none;
}
body.kit-custom-template .kit-tools-browser__hero::after { background-image: url("../img/home/tools-track-sweep-v4.png"); }
body.kit-custom-template .kit-tools-games-link::after { background-image: url("../img/home/games-track-sweep-v4.png"); }
body.kit-custom-template .kit-tools-browser__hero > *,
body.kit-custom-template .kit-tools-games-link > * { position: relative; z-index: 1; }

/* Footer (block part .kit-site-footer) */
body.kit-custom-template .kit-site-footer {
  background-color: var(--kf-brand-background) !important;
  background-image: none !important;
  border-top-color: var(--kf-brand-primary) !important;
  color: var(--kf-brand-text-soft) !important;
}
body.kit-custom-template .kit-site-footer__statement { color: var(--kf-brand-primary) !important; }
body.kit-custom-template .kit-site-footer__team,
body.kit-custom-template .kit-site-footer__email { border-left-color: var(--kf-brand-line) !important; }
body.kit-custom-template .kit-site-footer__email:hover,
body.kit-custom-template .kit-site-footer__email:focus-visible { color: var(--kf-brand-accent) !important; }
body.kit-custom-template .kit-site-footer__icon { filter: brightness(0) invert(1); opacity: 0.85; }

/* ---------- Tools and Games (shared showcase browser) ---------- */
body.kit-custom-template .kit-tools-browser__hero { background-color: var(--kf-brand-secondary) !important; color: var(--kf-brand-text) !important; }
body.kit-custom-template .kit-tools-browser__hero h1 { color: var(--kf-brand-text) !important; }
body.kit-custom-template:has(.kit-page-kit--games) .kit-tools-browser__hero { background-color: var(--kf-brand-primary) !important; }
body.kit-custom-template:has(.kit-page-kit--games) .kit-tools-browser__hero h1 { color: var(--kf-brand-text) !important; }
body.kit-custom-template .kit-tools-browser__hero h1 span,
body.kit-custom-template .kit-tools-browser__content h2 span { color: var(--kf-brand-accent) !important; }
body.kit-custom-template:has(.kit-page-kit--games) .kit-tools-browser__hero h1 span { color: var(--kf-brand-text) !important; }

body.kit-custom-template .kit-page-kit,
body.kit-custom-template .kit-tools-browser { background-color: var(--kf-brand-background) !important; color: var(--kf-brand-text-soft) !important; }
body.kit-custom-template .kit-tools-browser__selector-title { color: var(--kf-brand-primary) !important; }
body.kit-custom-template .kit-tools-browser__button,
body.kit-custom-template .kit-tools-browser__button-title,
body.kit-custom-template .kit-tools-browser__button-copy { color: var(--kf-brand-text-soft) !important; }
body.kit-custom-template .kit-tools-browser__button.is-active,
body.kit-custom-template .kit-tools-browser__button.is-active .kit-tools-browser__button-title { color: var(--kf-brand-primary) !important; }
body.kit-custom-template .kit-tools-browser__button:not(.is-active):hover,
body.kit-custom-template .kit-tools-browser__button:not(.is-active):focus-visible,
body.kit-custom-template .kit-tools-browser__button:not(.is-active):hover .kit-tools-browser__button-title,
body.kit-custom-template .kit-tools-browser__button:not(.is-active):focus-visible .kit-tools-browser__button-title { color: var(--kf-brand-accent) !important; }
body.kit-custom-template .kit-tools-browser__panel { background-color: var(--kf-brand-surface) !important; border-color: var(--kf-brand-line) !important; color: var(--kf-brand-text-soft) !important; }
body.kit-custom-template .kit-tools-browser__content h2 { color: var(--kf-brand-text) !important; }
body.kit-custom-template .kit-tools-browser__body,
body.kit-custom-template .kit-tools-browser__body p { color: var(--kf-brand-text-soft) !important; }
body.kit-custom-template .kit-tools-browser__media { background-color: var(--kf-brand-secondary) !important; }
body.kit-custom-template .kit-tools-browser .kit-page-button { color: var(--kf-brand-primary) !important; }
body.kit-custom-template .kit-tools-browser .kit-page-button:hover,
body.kit-custom-template .kit-tools-browser .kit-page-button:focus-visible { color: var(--kf-brand-accent) !important; }
body.kit-custom-template .kit-showcase-gallery__close { background-color: var(--kf-brand-surface) !important; border-color: var(--kf-brand-primary) !important; color: var(--kf-brand-primary) !important; }

/* Handoff band: gold on Tools (links to Games), navy on Games (links to Tools). Rule 2026-11-03: text on gold is cream; light boxes use the accent */
body.kit-custom-template .kit-tools-games-link { background-color: var(--kf-brand-primary) !important; color: var(--kf-brand-text) !important; }
body.kit-custom-template .kit-tools-games-link h2,
body.kit-custom-template .kit-tools-games-link p { color: var(--kf-brand-text) !important; border-left-color: rgba(240, 231, 213, 0.5) !important; }
body.kit-custom-template:has(.kit-page-kit--games) .kit-tools-games-link { background-color: var(--kf-brand-secondary) !important; color: var(--kf-brand-text) !important; }
body.kit-custom-template:has(.kit-page-kit--games) .kit-tools-games-link h2,
body.kit-custom-template:has(.kit-page-kit--games) .kit-tools-games-link p { color: var(--kf-brand-text) !important; border-left-color: rgba(240, 231, 213, 0.5) !important; }
body.kit-custom-template .kit-tools-games-link .wp-block-button__link { background-color: var(--kf-brand-accent) !important; border-color: var(--kf-brand-accent) !important; color: var(--kf-brand-background) !important; }
body.kit-custom-template .kit-tools-games-link .wp-block-button__link:hover,
body.kit-custom-template .kit-tools-games-link .wp-block-button__link:focus-visible { background-color: var(--kf-brand-background) !important; border-color: var(--kf-brand-background) !important; color: var(--kf-brand-text) !important; }
body.kit-custom-template:has(.kit-page-kit--games) .kit-tools-games-link .wp-block-button__link:hover,
body.kit-custom-template:has(.kit-page-kit--games) .kit-tools-games-link .wp-block-button__link:focus-visible { background-color: var(--kf-brand-primary) !important; border-color: var(--kf-brand-primary) !important; color: var(--kf-brand-background) !important; }

/* ---------- About, Services and other template pages ---------- */
body.kit-custom-template .kit-page-hero-kit--tools,
body.kit-custom-template .kit-page-hero-kit--contact { background-color: var(--kf-brand-background) !important; }
body.kit-custom-template .kit-page-hero-kit--games,
body.kit-custom-template .kit-page-hero-kit--about { background-color: var(--kf-brand-primary) !important; color: var(--kf-brand-text) !important; }
body.kit-custom-template .kit-page-section--paper { background-color: var(--kf-brand-surface) !important; color: var(--kf-brand-text-soft) !important; }
body.kit-custom-template .kit-page-section--paper h2 { color: var(--kf-brand-text) !important; }
body.kit-custom-template .kit-page-section--green { color: var(--kf-brand-text) !important; }
body.kit-custom-template .kit-page-section--orange { color: var(--kf-brand-text) !important; }
/* headings inherit a teal from the old stylesheet: set them per band */
body.kit-custom-template .kit-page-hero-kit--games :is(h1, h2, h3),
body.kit-custom-template .kit-page-hero-kit--about :is(h1, h2, h3),
body.kit-custom-template .kit-page-section--orange :is(h1, h2, h3) { color: var(--kf-brand-text) !important; }
body.kit-custom-template .kit-page-section--green :is(h1, h2, h3) { color: var(--kf-brand-text) !important; }

/* Template-page header (PHP): dark bar, light links, accent checker flag */
body.kit-custom-template .kit-header { background-color: var(--kf-brand-background) !important; background-image: none !important; color: var(--kf-brand-text-soft) !important; }
body.kit-custom-template .kit-header::before { background: conic-gradient(var(--kf-brand-accent) 25%, transparent 0 50%, var(--kf-brand-accent) 0 75%, transparent 0) center / 2.8rem 2.8rem !important; }
body.kit-custom-template .kit-home-wordmark-image { filter: url(#kf-logo-map); }
body.kit-custom-template .kit-home-header__nav a,
body.kit-custom-template .kit-home-header__mobile-nav a { color: var(--kf-brand-text-soft) !important; }
body.kit-custom-template .kit-home-header__nav a:hover,
body.kit-custom-template .kit-home-header__nav a:focus-visible,
body.kit-custom-template .kit-home-header__mobile-nav a:hover,
body.kit-custom-template .kit-home-header__mobile-nav a:focus-visible,
body.kit-custom-template .kit-home-header__nav a[aria-current="page"],
body.kit-custom-template .kit-home-header__mobile-nav a[aria-current="page"] { color: var(--kf-brand-accent) !important; }
body.kit-custom-template .kit-home-header__mobile-nav { background-color: var(--kf-brand-surface) !important; }
body.kit-custom-template .kit-home-header__toggle span { background-color: var(--kf-brand-text) !important; }
body.kit-custom-template .kit-home-language__button { color: var(--kf-brand-text-soft) !important; }
body.kit-custom-template .kit-home-language__menu { background-color: var(--kf-brand-surface) !important; border-color: var(--kf-brand-primary) !important; }
body.kit-custom-template .kit-home-language__menu button,
body.kit-custom-template .kit-home-language__menu button span { color: var(--kf-brand-text-soft) !important; }

/* ---------- Contact ---------- */
body.kit-custom-template .kit-contact-hero { background-color: var(--kf-brand-primary) !important; }
body.kit-custom-template .kit-contact-hero h1 { color: var(--kf-brand-text) !important; }
body.kit-custom-template .kit-contact-track { background-color: var(--kf-brand-background) !important; border-color: var(--kf-brand-primary) !important; }
body.kit-custom-template .kit-contact-hero-copy,
body.kit-custom-template .kit-contact-hero-copy p { color: var(--kf-brand-text) !important; }
body.kit-custom-template .kit-contact-hero h1 mark { color: var(--kf-brand-text) !important; }

/* Form: send button on the green accent-2 with dark text + dark arrow (owner 2026-11-05: green reads better than yellow on the cream card) */
body.kit-custom-template .kit-editor-form .kit-contact-submit { background: var(--kf-brand-accent-2); }
body.kit-custom-template .kit-editor-form input[type="submit"] { color: var(--kf-brand-background); }
body.kit-custom-template .kit-editor-form .kit-contact-submit::after { filter: none; }
/* Focus: NO inner box when writing (owner, 2026-11-04). The field's own outer border
   is the only frame; CF7 already sets outline:0, we just make sure nothing draws a ring. */
body.kit-custom-template .wpcf7 form.wpcf7-form :is(input:not([type="submit"]), textarea):focus-visible {
  outline: none;
  box-shadow: none;
}
/* Textarea: subtle thin scrollbar, only when the text overflows the box. */
body.kit-custom-template .wpcf7 form.wpcf7-form textarea {
  scrollbar-width: thin;
  scrollbar-color: rgba(5, 21, 69, 0.35) transparent;
}
body.kit-custom-template .wpcf7 form.wpcf7-form textarea::-webkit-scrollbar { width: 6px; }
body.kit-custom-template .wpcf7 form.wpcf7-form textarea::-webkit-scrollbar-thumb {
  background: rgba(5, 21, 69, 0.35);
  border-radius: 3px;
}

/* Handoff band: Tools cream, Games gold; arrows follow */
body.kit-custom-template .kit-contact-handoff { background-color: var(--kf-brand-background) !important; }
body.kit-custom-template .kit-contact-handoff h2 { color: var(--kf-brand-primary) !important; }
body.kit-custom-template .kit-contact-handoff h2.has-kit-green-color { color: var(--kf-brand-text) !important; }
body.kit-custom-template .kit-contact-arrow--kit-green,
body.kit-custom-template .kit-contact-arrow--kit-orange { filter: url(#kf-accent); }

/* Narrow: the track card is hidden, content sits on the dark page (icons are black SVGs) */
@media (max-width: 1199.98px) {
  body.kit-custom-template .kit-contact-info-row img { filter: url(#kf-accent); }
}
/* Wide: the racetrack raster draws a cream card behind the form, so text inside goes dark */
@media (min-width: 1200px) {
  body.kit-custom-template .kit-contact-track {
    --wp--preset--color--kit-ink: var(--kf-brand-background);
    color: var(--kf-brand-background);
    background-color: var(--wp--preset--color--kit-cream) !important;
  }
  body.kit-custom-template .kit-contact-track mark.has-kit-orange-color,
  body.kit-custom-template .kit-contact-track h2.has-kit-orange-color { color: var(--kf-brand-secondary) !important; }
  /* keep the "Send us a message." period coral on the flat cream card */
  body.kit-custom-template .kit-contact-intro h2 mark.has-kit-orange-color { color: var(--kf-brand-primary) !important; }
}

/* ---------- Yellow CTA family (owner 2026-11-06) ----------
   Every yellow button (Home cards, Tools/Games handoff band) uses the type of the store bar "Get it in ...":
   Arial 800, uppercase, 0.06em tracking, the text and an inline arrow of the same size, centred together.
   Each button keeps its own size; the 15 px store bars (.kit-tc__cta) are the reference and stay as they are. */
body.home .kit-home-band__link .wp-block-button__link,
body.kit-custom-template .kit-tools-games-link .wp-block-button__link {
  font-family: Arial, sans-serif !important;
  font-weight: 800 !important;
  gap: 0.4em !important;
  justify-content: center !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
}
body.home .kit-home-band__link .wp-block-button__link > span[aria-hidden="true"],
body.kit-custom-template .kit-tools-games-link .wp-block-button__link > span[aria-hidden="true"] {
  font-size: 1em !important;
  line-height: 1 !important;
}
body.home .kit-home-band__link .wp-block-button__link { font-size: clamp(0.9rem, 5.2cqw, 1.35rem) !important; } /* cqw of the card: the uppercase label stays on one line from 1200 to 2560 px */
body.kit-custom-template .kit-tools-games-link .wp-block-button__link { font-size: clamp(0.95rem, 1.3vw, 1.25rem) !important; }

/* Contact "Send message" = same family, in green (owner 2026-11-06): Arial 800 uppercase 0.06em, arrow of the same size, centred together */
body.kit-custom-template .kit-editor-form .kit-contact-submit { gap: 0.4em; font-size: clamp(1.05rem, 1.4vw, 1.35rem); }
body.kit-custom-template .kit-editor-form input[type="submit"],
body.kit-custom-template .kit-editor-form .kit-contact-submit::after {
  font-family: Arial, sans-serif;
  font-weight: 800;
  font-size: 1em;
  line-height: 1;
  letter-spacing: 0.06em;
}
body.kit-custom-template .kit-editor-form input[type="submit"] { text-transform: uppercase; }
@media (max-width: 600px) { /* phone: the whole green bar is the tap target, not only the 17 px label */
  body.kit-custom-template .kit-editor-form input[type="submit"] { padding: 0.45rem 0; }
}

/* Tools/Games: the coral handoff band never touches the footer, so the footer's pink line reads the same on both pages (owner 2026-11-06) */
body.kit-custom-template .kit-tools-games-link { margin-bottom: clamp(1rem, 1.9vw, 1.75rem); }

/* Phones: the handoff band stacks title / text / button, so the track-sweep stripes (full band height, anchored
   right) ran through the paragraph. Shrink them into the bottom-right corner, beside the button. */
@media (max-width: 600px) {
  body.kit-custom-template .kit-tools-games-link::after { background-size: auto 30%; }
}

/* Hamburger menu (core navigation overlay, shown below 600 px): a dropdown panel under the button, same box as the
   language menu (surface fill, coral border, shadow), one icon per page instead of a flag. Core ships it as a white
   full-screen overlay and the header link colour is light, so the labels were white on white (owner 2026-11-07).
   Scoped to .is-menu-open: the inline desktop nav is untouched. Icons are CSS masks (no files, no network). */
body.kit-custom-template .kit-contact-header .wp-block-navigation { position: relative; }
body.kit-custom-template .kit-contact-header .wp-block-navigation__responsive-container.is-menu-open {
  position: absolute !important;
  inset: calc(100% + 0.7rem) 0 auto auto !important;
  width: max-content !important;
  min-width: 11rem;
  max-width: calc(100vw - 2rem);
  height: auto !important;
  padding: 0.45rem !important;
  overflow: visible !important;
  animation: none !important;
  background-color: var(--kf-brand-surface) !important;
  border: 0.12rem solid var(--kf-brand-primary);
  box-shadow: 0 0.7rem 1.4rem rgba(0, 0, 0, 0.45);
  color: var(--kf-brand-text-soft) !important;
}
body.kit-custom-template .kit-contact-header .is-menu-open .wp-block-navigation__responsive-close,
body.kit-custom-template .kit-contact-header .is-menu-open .wp-block-navigation__responsive-dialog { margin: 0 !important; max-width: none !important; width: 100%; }
body.kit-custom-template .kit-contact-header .is-menu-open .wp-block-navigation__responsive-container-close {
  position: static !important;
  display: block;
  width: max-content;
  margin: 0 0 0.15rem auto;
  padding: 0.35rem;
  color: var(--kf-brand-primary);
}
body.kit-custom-template .kit-contact-header .is-menu-open .wp-block-navigation__responsive-container-content { padding: 0 !important; align-items: stretch !important; }
body.kit-custom-template .kit-contact-header .is-menu-open .wp-block-navigation__container { gap: 0.15rem !important; align-items: stretch !important; width: 100%; }
body.kit-custom-template .kit-contact-header .is-menu-open .wp-block-navigation-item { align-items: stretch !important; }
body.kit-custom-template .kit-contact-header .is-menu-open .wp-block-navigation-item__content {
  align-items: center;
  display: flex;
  font-size: 0.95rem;
  font-weight: 600;
  gap: 0.7rem;
  justify-content: flex-start !important;
  line-height: 1.15;
  padding: 0.55rem !important;
  text-align: left;
  text-decoration: none;
  white-space: nowrap;
}
body.kit-custom-template .kit-contact-header .is-menu-open .wp-block-navigation-item__content::before {
  background-color: currentColor;
  content: "";
  flex: 0 0 auto;
  height: 1.15rem;
  width: 1.15rem;
  -webkit-mask: var(--kf-nav-icon) center / contain no-repeat;
  mask: var(--kf-nav-icon) center / contain no-repeat;
}
body.kit-custom-template .kit-contact-header .is-menu-open .wp-block-navigation-item__content:hover,
body.kit-custom-template .kit-contact-header .is-menu-open .wp-block-navigation-item__content:focus-visible,
body.kit-custom-template .kit-contact-header .is-menu-open .wp-block-navigation-item__content[aria-current="page"] { background: var(--kf-brand-secondary); }
body.kit-custom-template .kit-contact-header .is-menu-open .wp-block-navigation-item__content:focus-visible { outline: 0.15rem solid var(--kf-brand-accent); outline-offset: -0.15rem; }
body.kit-custom-template .kit-contact-header .is-menu-open .wp-block-navigation__container > li:nth-child(1) { --kf-nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 11l9-8 9 8'/%3E%3Cpath d='M5 10v10h5v-6h4v6h5V10'/%3E%3C/svg%3E"); }
body.kit-custom-template .kit-contact-header .is-menu-open .wp-block-navigation__container > li:nth-child(2) { --kf-nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z'/%3E%3C/svg%3E"); }
body.kit-custom-template .kit-contact-header .is-menu-open .wp-block-navigation__container > li:nth-child(3) { --kf-nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 11h4M8 9v4M15 12h.01M18 10h.01'/%3E%3Cpath d='M17.32 5H6.68a4 4 0 0 0-3.98 3.59C2.6 9.42 2 14.46 2 16a3 3 0 0 0 3 3c1 0 1.5-.5 2-1l1.41-1.41A2 2 0 0 1 9.83 16h4.34a2 2 0 0 1 1.41.59L17 18c.5.5 1 1 2 1a3 3 0 0 0 3-3c0-1.55-.6-6.58-.69-7.26A4 4 0 0 0 17.32 5z'/%3E%3C/svg%3E"); }
body.kit-custom-template .kit-contact-header .is-menu-open .wp-block-navigation__container > li:nth-child(4) { --kf-nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='20' height='16' x='2' y='4' rx='2'/%3E%3Cpath d='m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7'/%3E%3C/svg%3E"); }

/* ============================================================
   NARROW AND SQUARE VIEWPORTS (owner 2026-11-18, responsive audit rev. 3; history/responsive-narrow-2026-11-18.md)
   Four rules apply at every width: the Contact heading and its empty-column rule (a deliberate desktop change), the
   subtitle `text-wrap` and the `picture` box (no visible change at desktop). Everything else is below 1200 px so the
   approved desktop layouts do not move. .98 = no dead zone at fractional widths (zoom, DPR).
   ============================================================ */

/* Contact: "Send us a message." repeated the hero title right above it (owner 2026-11-18). Kept for screen readers, not drawn.
   An intro column left with no paragraph (English: main.js removes it) is dropped so no empty column remains. */
body.kit-custom-template .kit-contact-intro h2 {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: 0;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
}
body.kit-custom-template .kit-contact-grid > .wp-block-column:first-child:not(:has(p)) { display: none; }

/* Home subtitle: no last line with a lone short word ("IA", "KI"); the languages also bind it with a no-break space in site.json */
body.home .kit-home__intro p { text-wrap: pretty; }

/* Games card image: <picture> must not break the cover fit of the figure */
.kit-tc__feature-media picture { display: contents; }

@media (max-width: 1199.98px) {
  /* Contact: opaque field face so the warp particles never cross the text; the coral border stays (owner 2026-11-04) */
  body.kit-custom-template .kit-editor-form .kit-contact-field {
    background: linear-gradient(rgba(240, 231, 213, 0.06), rgba(240, 231, 213, 0.06)), var(--kf-brand-background);
  }
  /* Contact: direct-contact lines at body size (were ~12 px: .8em of a clamp that bottoms out at 15 px) */
  body.kit-custom-template .kit-contact-direct .kit-contact-info-row p { font-size: 1rem !important; }
  body.kit-custom-template .kit-contact-direct .kit-contact-info-row a { font-size: 1em; }
  body.kit-custom-template .kit-contact-direct .kit-contact-info-row small { font-size: 0.9em; }

  /* Games has one collection: its title sits above the card instead of in a 200 px column with a void under it */
  body.kit-custom-template .kit-tc--games .kit-tc__layout { grid-template-columns: minmax(0, 1fr); }
  body.kit-custom-template .kit-tc--games .kit-tc__nav { position: static; }
}

/* Contact 901-1199: two columns (intro | form); with the intro column dropped, the form takes the row */
@media (min-width: 901px) and (max-width: 1199.98px) {
  body.kit-custom-template .kit-contact-grid > .wp-block-column:first-child:not(:has(p)) + .wp-block-column { grid-column: 1 / -1; }
}

/* Games card, phone: the 4:3 composition made for a narrow column (picture source in games-catalog.php), shown whole */
@media (max-width: 599.98px) {
  body.kit-custom-template .kit-tc--games .kit-tc__feature-media { aspect-ratio: 4 / 3; }
}

/* Home 761-1199 (square, tablet): Tools and Games side by side under the headline; spare height goes to the headline block,
   the cards keep their size and the buttons sit on the same line. Sizes are cqw of each card, so titles scale by themselves. */
@media (min-width: 761px) and (max-width: 1199.98px) {
  body.home .kit-home {
    align-items: stretch;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: 1fr auto;
  }
  body.home .kit-home > * { margin-block-start: 0; }
  body.home .kit-home__intro { --kit-h1-cap: clamp(4.4rem, 9vw, 7rem); grid-column: 1 / -1; }
  body.home .kit-home__intro p { font-size: clamp(1.2rem, 2.4vw, 1.75rem); max-width: 44rem; }
  body.home .kit-home-band__content,
  body.home .kit-home-band__detail { flex: 1 1 auto; }
  body.home .kit-home-band__detail > .wp-block-buttons { margin-top: auto; }
}
