/* ============================================================
   KITforge Labs - Tools catalog (Toolbox + UI Custom Kit)
   Rendered by template-parts/tools-catalog*.php from content/tools/*.json.
   Uses only the brand tokens of brand.css (:root) and the theme display font.
   ============================================================ */
.kit-tc {
  --tc-line: var(--kf-brand-line, rgba(240, 231, 213, 0.18));
  --tc-tint: rgba(240, 231, 213, 0.05);
  --tc-tint-strong: rgba(240, 231, 213, 0.1);
  background: var(--kf-brand-background, #051545);
  color: var(--kf-brand-text-soft, #e8e8e8);
  padding: clamp(0.75rem, 2vw, 1.5rem) 0 clamp(1.5rem, 3vw, 2.5rem);
}

.kit-tc__layout {
  align-items: start;
  display: grid;
  gap: clamp(0.9rem, 1.8vw, 1.4rem);
  grid-template-columns: minmax(10.5rem, 12.5rem) minmax(0, 1fr);
}

/* ---------- Sidebar: the products (poster style) ---------- */
.kit-tc__nav {
  display: grid;
  gap: 0;
  position: sticky;
  top: 1rem;
}

.kit-tc__product {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--kf-brand-text-soft, #e8e8e8);
  cursor: pointer;
  display: grid;
  font: inherit;
  gap: 0.5rem;
  padding: 0;
  text-align: left;
  transition: color 0.15s;
}

/* keep the button transparent in every state (beat Astra's element-level button:hover) */
.kit-tc__nav .kit-tc__product:hover,
.kit-tc__nav .kit-tc__product:focus { background: transparent; }

/* a green rule divides one product from the next */
.kit-tc__product + .kit-tc__product {
  border-top: 0.14rem solid var(--kf-brand-accent-2, #8add7f);
  margin-top: 1.3rem;
  padding-top: 1.3rem;
}

.kit-tc__product-title,
.kit-tc__title,
.kit-tc__row-title {
  font-family: var(--kit-display, "KITforge Display", Impact, sans-serif);
  font-style: italic;
  font-weight: 900;
  letter-spacing: var(--kit-display-tracking);
  line-height: 0.85;
  text-transform: uppercase;
}

/* resting product title: green display text, no bar (stretches full column so the active bar is full width) */
.kit-tc__product-title {
  color: var(--kf-brand-accent-2, #8add7f);
  font-size: clamp(1.9rem, 2.2vw + 1rem, 2.5rem);
  line-height: 0.9;
}

/* active product: title sits on a coral bar with cream text, same as the other light lettering (owner 2026-11-05 bar, 2026-11-06 light text, not pure white) */
.kit-tc__product.is-active .kit-tc__product-title {
  background: var(--kf-brand-primary, #fd6077);
  color: var(--kf-brand-text, #f0e7d5);
  padding: 0.1em 0.34em 0.18em;
}

.kit-tc__product:not(.is-active):hover .kit-tc__product-title,
.kit-tc__product:not(.is-active):focus-visible .kit-tc__product-title { color: var(--kf-brand-accent, #feff00); }

/* Games has one long title ("Games in Development"); scale it down so the coral bar fits the narrower column */
.kit-tc--games .kit-tc__product-title { font-size: clamp(1.5rem, 4.2vw, 1.9rem); }

.kit-tc__product-tag {
  color: var(--kf-brand-text, #f0e7d5);
  font-size: 0.9rem;
  line-height: 1.3;
  opacity: 0.92;
}

/* ---------- Panel head ---------- */
.kit-tc__panel[hidden] { display: none; }

.kit-tc__head {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.kit-tc__title { color: var(--kf-brand-text, #f0e7d5); font-size: clamp(2.2rem, 5vw, 3.6rem); margin: 0; }
.kit-tc__title span { color: var(--kf-brand-accent, #feff00); }

/* thin full-width bar right above the list (below the ticker) */
.kit-tc__cta {
  align-items: center;
  background: var(--kf-brand-accent, #feff00);
  clip-path: polygon(0.6rem 0, 100% 0, calc(100% - 0.6rem) 100%, 0 100%);
  color: var(--kf-brand-background, #051545);
  display: flex;
  font-size: 0.72rem;
  font-weight: 800;
  justify-content: center;
  letter-spacing: 0.06em;
  margin: 0 0 0.6rem;
  line-height: 1;
  min-height: 0;
  padding: 0.12rem 1.6rem;
  text-decoration: none;
  text-transform: uppercase;
  transition: background-color 0.15s;
}

.kit-tc__cta:hover { background: var(--kf-brand-text, #f0e7d5); }

/* every 10-20s (tools-catalog.js) the bar glitches for half a second, in the same steps()/RGB-split language as glitch.css:
   hard colour jumps between pink, green and yellow with white text, then back to the resting yellow */
.kit-tc__cta.is-glitching { animation: kit-tc-cta-glitch 0.5s steps(1) 1 both; }

@keyframes kit-tc-cta-glitch {
  0% { background-color: var(--kf-brand-primary, #fd6077); color: #fff; text-shadow: -2px 0 #05d9e8, 2px 0 #ff2a6d; transform: translateX(-3px); clip-path: polygon(0.6rem 0, 100% 0, calc(100% - 0.6rem) 100%, 0 100%); }
  8% { background-color: var(--kf-brand-accent-2, #8add7f); color: #fff; text-shadow: -2px 0 #05d9e8, 2px 0 #ff2a6d; transform: translateX(4px); clip-path: polygon(0.6rem 0, 100% 0, calc(100% - 0.3rem) 50%, 0 50%); }
  16% { background-color: var(--kf-brand-accent, #feff00); color: #fff; text-shadow: -2px 0 #05d9e8, 2px 0 #ff2a6d; transform: translateX(-2px); clip-path: polygon(0 50%, 100% 50%, calc(100% - 0.6rem) 100%, 0 100%); }
  25% { background-color: var(--kf-brand-primary, #fd6077); color: #fff; text-shadow: -2px 0 #05d9e8, 2px 0 #ff2a6d; transform: translateX(3px); clip-path: polygon(0.6rem 0, 100% 0, calc(100% - 0.6rem) 100%, 0 100%); }
  33% { background-color: var(--kf-brand-accent-2, #8add7f); color: #fff; text-shadow: -2px 0 #05d9e8, 2px 0 #ff2a6d; transform: translateX(0px); clip-path: polygon(0 28%, 100% 28%, 100% 72%, 0 72%); }
  42% { background-color: var(--kf-brand-primary, #fd6077); color: #fff; text-shadow: -2px 0 #05d9e8, 2px 0 #ff2a6d; transform: translateX(-4px); clip-path: polygon(0.6rem 0, 100% 0, calc(100% - 0.6rem) 100%, 0 100%); }
  50% { background-color: var(--kf-brand-accent, #feff00); color: #fff; text-shadow: -2px 0 #05d9e8, 2px 0 #ff2a6d; transform: translateX(2px); clip-path: polygon(0.6rem 0, 100% 0, calc(100% - 0.3rem) 50%, 0 50%); }
  58% { background-color: var(--kf-brand-accent-2, #8add7f); color: #fff; text-shadow: -2px 0 #05d9e8, 2px 0 #ff2a6d; transform: translateX(-2px); clip-path: polygon(0.6rem 0, 100% 0, calc(100% - 0.6rem) 100%, 0 100%); }
  67% { background-color: var(--kf-brand-primary, #fd6077); color: #fff; text-shadow: -2px 0 #05d9e8, 2px 0 #ff2a6d; transform: translateX(1px); clip-path: polygon(0 50%, 100% 50%, calc(100% - 0.6rem) 100%, 0 100%); }
  75% { background-color: var(--kf-brand-accent-2, #8add7f); color: #fff; text-shadow: -2px 0 #05d9e8, 2px 0 #ff2a6d; transform: translateX(3px); clip-path: polygon(0.6rem 0, 100% 0, calc(100% - 0.6rem) 100%, 0 100%); }
  83% { background-color: var(--kf-brand-primary, #fd6077); color: #fff; text-shadow: -2px 0 #05d9e8, 2px 0 #ff2a6d; transform: translateX(-1px); clip-path: polygon(0 28%, 100% 28%, 100% 72%, 0 72%); }
  92%, 100% { background-color: var(--kf-brand-accent, #feff00); color: var(--kf-brand-background, #051545); text-shadow: none; transform: none; clip-path: polygon(0.6rem 0, 100% 0, calc(100% - 0.6rem) 100%, 0 100%); }
}

/* ---------- Games: three store bars + the "in development" card (stand in for the Unity Store bar and the list) ---------- */
.kit-tc__stores {
  display: grid;
  gap: 0.4rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 0 0.6rem;
}
.kit-tc__stores .kit-tc__cta { margin: 0; padding: 0.12rem 0.8rem; white-space: nowrap; }
.kit-tc__stores + .kit-tc__feature { margin-top: 0; }

.kit-tc__feature {
  background: var(--tc-tint);
  border: 1px solid var(--tc-line);
  border-left: 0.3rem solid var(--kf-brand-primary, #fd6077);
  border-radius: 0.4rem;
  margin: 0.6rem 0 0;
  overflow: hidden;
}

.kit-tc__feature-media { aspect-ratio: 22 / 5; background: #fff; margin: 0; }
.kit-tc__feature-media img { display: block; height: 100%; object-fit: cover; width: 100%; }
.kit-tc__feature-body { padding: 1rem 1.25rem 1.25rem; }

.kit-tc__feature-title {
  color: var(--kf-brand-text, #f0e7d5);
  font-family: var(--kit-display, "KITforge Display", Impact, sans-serif);
  font-size: 1.25rem;
  font-style: italic;
  font-weight: 900;
  letter-spacing: var(--kit-display-tracking);
  line-height: 0.85;
  margin: 0;
  text-transform: uppercase;
}

.kit-tc__feature-copy { font-size: 0.95rem; line-height: 1.5; margin: 0.7rem 0 0; opacity: 0.9; }

/* ---------- Categories and rows ---------- */
.kit-tc__cat-title {
  border-bottom: 1px solid var(--tc-line);
  color: var(--kf-brand-text, #f0e7d5);
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  margin: 2rem 0 0.8rem;
  opacity: 0.7;
  padding-bottom: 0.45rem;
  text-transform: uppercase;
}

.kit-tc__cat:first-of-type .kit-tc__cat-title { margin-top: 0; }

.kit-tc__row {
  background: var(--tc-tint);
  border: 1px solid var(--tc-line);
  border-left: 0.3rem solid var(--kf-brand-primary, #fd6077);
  border-radius: 0.4rem;
  margin-bottom: 0.6rem;
}

.kit-tc__row-head {
  align-items: center;
  display: flex;
  gap: 0.8rem;
  list-style: none;
  min-height: 2.75rem;
  padding: 0.75rem 1rem;
}

.kit-tc__row-head::-webkit-details-marker { display: none; }
details.kit-tc__row > summary { cursor: pointer; }
details.kit-tc__row > summary::before { color: var(--kf-brand-primary, #fd6077); content: "\25B8"; font-size: 0.8rem; transition: transform 0.15s; }
details.kit-tc__row[open] > summary::before { transform: rotate(90deg); }
details.kit-tc__row[open] { border-left-color: var(--kf-brand-accent, #feff00); }
details.kit-tc__row > summary:hover .kit-tc__row-title { color: var(--kf-brand-accent, #feff00); }

.kit-tc__row-text { display: grid; flex: 1; gap: 0.3rem; min-width: 0; }
.kit-tc__row-title { color: var(--kf-brand-text, #f0e7d5); font-size: 1.25rem; }
.kit-tc__row-value { font-size: 0.95rem; line-height: 1.35; opacity: 0.85; }

.kit-tc__chip {
  border: 1px solid var(--tc-line);
  border-radius: 2rem;
  color: var(--kf-brand-accent, #feff00);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.6rem;
  white-space: nowrap;
}

.kit-tc__soon-label {
  color: var(--kf-brand-accent, #feff00);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  margin: 1.1rem 0 0.5rem;
  text-transform: uppercase;
}

.kit-tc__row--soon { border-left-color: var(--tc-line); }
.kit-tc__row--soon .kit-tc__row-head { padding-left: 1.7rem; }
.kit-tc__row--soon .kit-tc__row-title,
.kit-tc__row--soon .kit-tc__row-value { opacity: 0.75; }

/* ---------- Expanded entry ---------- */
.kit-tc__entry {
  border-top: 1px solid var(--tc-line);
  display: grid;
  gap: 1.25rem;
  grid-template-columns: minmax(0, 1fr) minmax(13rem, 18rem);
  padding: 1rem 1.1rem 1.25rem 1.7rem;
}

.kit-tc__cols { display: grid; gap: 1rem 1.5rem; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 1rem; }

.kit-tc__label {
  color: var(--kf-brand-primary, #fd6077);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  margin: 0 0 0.4rem;
  text-transform: uppercase;
}

.kit-tc__list { margin: 0; padding-left: 1.1rem; }
.kit-tc__list li { font-size: 0.95rem; line-height: 1.4; margin-bottom: 0.25rem; }

.kit-tc__example {
  background: rgba(5, 21, 69, 0.7);
  border: 1px solid var(--tc-line);
  border-radius: 0.4rem;
  padding: 0.8rem 1rem;
}

.kit-tc__example p { font-size: 0.95rem; line-height: 1.45; margin: 0; }
.kit-tc__meta { font-size: 0.8rem !important; margin-top: 0.5rem !important; opacity: 0.85; }
.kit-tc__meta code { background: none; color: var(--kf-brand-accent, #feff00); font-size: 0.85rem; padding: 0; }

/* white placeholder box for images and gifs (final media arrives later) */
.kit-tc__media {
  align-self: start;
  justify-self: center;
  aspect-ratio: 1 / 1;
  width: 100%;
  max-width: 15rem;
  background: #fff;
  border-radius: 0.4rem;
  overflow: hidden;
}

.kit-tc__media img { display: block; height: 100%; object-fit: cover; width: 100%; }

/* ---------- Focus ---------- */
.kit-tc__product:focus-visible,
.kit-tc__cta:focus-visible,
details.kit-tc__row > summary:focus-visible {
  outline: 0.2rem solid var(--kf-brand-accent, #feff00);
  outline-offset: 0.15rem;
}

/* the first category title would sit right under the CTA bar: keep it for screen readers only */
.kit-tc__cat:first-of-type > .kit-tc__cat-title { border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; margin: 0; overflow: hidden; padding: 0; position: absolute; width: 1px; }

/* the bar is yellow and clip-path trims an outside ring: draw the focus ring inside, in navy */
.kit-tc__cta:focus-visible { outline-color: var(--kf-brand-background, #051545); outline-offset: -0.35rem; }

/* ---------- Small screens ---------- */
/* Expanded entry stacks (DOES / YOU ADJUST, then the image) up to 1199 px: at 1024 the panel is ~705 px and two text
   columns plus the image left 164 px per column (owner 2026-11-06: the square view should look like the narrow one). */
@media (max-width: 1199.98px) {
  .kit-tc__entry { grid-template-columns: minmax(0, 1fr); padding-left: 1.1rem; }
  .kit-tc__cols { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 820px) {
  .kit-tc__layout { grid-template-columns: minmax(0, 1fr); }
  .kit-tc__row-head { flex-wrap: wrap; }
}

/* ---------- Dropdown menu, <= 820 px (owner mockup 2026-11-18) ----------
   The product list left the flow (it pushed the content down, more with every product). Closed, only a square yellow tab with
   a navy arrow stays in the bottom-left corner; open, a card pops up from it: coral head "Collections" + close X, one tile per
   product (cream, the current one blue with a check).
   Selectors carry body.kit-custom-template so they beat brand.css (.kit-tc--games .kit-tc__nav { position: static } at <= 1199 px). */
.kit-tc__nav-list { display: grid; gap: 0; }

.kit-tc__nav-head,
.kit-tc__product-current,
.kit-tc__drawer-tab,
.kit-tc__scrim { display: none; }

@media (max-width: 820px) {
  .kit-tc { --tc-drawer-w: min(78vw, 18.5rem); --tc-drawer-gap: 0.6rem; --tc-head: 2.75rem; --tc-tab: 3.025rem; --tc-dur: 0.6s; --tc-ease: cubic-bezier(0.34, 1.45, 0.64, 1); }

  body.kit-custom-template .kit-tc[data-tc] .kit-tc__nav {
    background: var(--kf-brand-text, #f0e7d5);
    border-radius: 0.7rem;
    box-shadow: 0 0.5rem 1.4rem rgba(0, 0, 0, 0.45);
    display: flex;
    flex-direction: column;
    bottom: calc(var(--tc-tab) + var(--tc-drawer-gap) + env(safe-area-inset-bottom, 0px));
    left: var(--tc-drawer-gap);
    max-height: calc(100vh - var(--tc-tab) - 2rem);
    max-height: calc(100dvh - var(--tc-tab) - 2rem);
    opacity: 0;
    overflow: hidden;
    position: fixed;
    top: auto;
    transform: scale(0.35) translateY(1.2rem);
    transform-origin: 0 100%;
    transition: transform var(--tc-dur) var(--tc-ease), opacity 0.2s ease, visibility 0s linear var(--tc-dur);
    visibility: hidden;
    width: var(--tc-drawer-w);
    z-index: 71;
  }

  body.kit-custom-template .kit-tc[data-tc].is-drawer-open .kit-tc__nav { opacity: 1; transform: none; transition-delay: 0s; visibility: visible; }

  /* head: coral bar, title + close */
  body.kit-custom-template .kit-tc[data-tc] .kit-tc__nav-head {
    align-items: center;
    background: var(--kf-brand-primary, #fd6077);
    display: flex;
    flex: none;
    height: var(--tc-head);
    justify-content: space-between;
    padding: 0 0 0 1rem;
  }

  .kit-tc__nav-title {
    color: var(--kf-brand-background, #051545);
    font-family: var(--kit-display, "KITforge Display", Impact, sans-serif);
    font-size: 1.55rem;
    font-style: italic;
    font-weight: 900;
    letter-spacing: var(--kit-display-tracking);
    line-height: 1;
    text-transform: uppercase;
  }

  body.kit-custom-template .kit-tc[data-tc] .kit-tc__nav-close {
    -webkit-appearance: none;
    appearance: none;
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 0;
    color: var(--kf-brand-background, #051545);
    cursor: pointer;
    display: flex;
    height: var(--tc-head);
    justify-content: center;
    padding: 0;
    width: var(--tc-head);
  }
  body.kit-custom-template .kit-tc[data-tc] .kit-tc__nav-close:hover,
  body.kit-custom-template .kit-tc[data-tc] .kit-tc__nav-close:focus { background: transparent; color: var(--kf-brand-background, #051545); }
  body.kit-custom-template .kit-tc[data-tc] .kit-tc__nav-close:focus-visible { outline: 0.2rem solid var(--kf-brand-background, #051545); outline-offset: -0.45rem; }
  .kit-tc__nav-close svg { display: block; height: 1.3rem; width: 1.3rem; }

  /* tiles: cream, the current one blue */
  body.kit-custom-template .kit-tc[data-tc] .kit-tc__nav-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; }

  body.kit-custom-template .kit-tc[data-tc] .kit-tc__nav .kit-tc__product {
    background: var(--kf-brand-text, #f0e7d5);
    border: 0;
    border-radius: 0;
    color: var(--kf-brand-background, #051545);
    gap: 0.35rem;
    margin: 0;
    padding: 0.85rem 3rem 0.9rem 1rem;
    position: relative;
    width: 100%;
  }
  body.kit-custom-template .kit-tc[data-tc] .kit-tc__nav .kit-tc__product:hover,
  body.kit-custom-template .kit-tc[data-tc] .kit-tc__nav .kit-tc__product:focus { background: var(--kf-brand-text, #f0e7d5); }
  body.kit-custom-template .kit-tc[data-tc] .kit-tc__nav .kit-tc__product.is-active,
  body.kit-custom-template .kit-tc[data-tc] .kit-tc__nav .kit-tc__product.is-active:hover,
  body.kit-custom-template .kit-tc[data-tc] .kit-tc__nav .kit-tc__product.is-active:focus { background: var(--kf-brand-secondary, #0067bf); color: var(--kf-brand-text, #f0e7d5); }
  body.kit-custom-template .kit-tc[data-tc] .kit-tc__nav .kit-tc__product:focus-visible { outline-color: var(--kf-brand-background, #051545); outline-offset: -0.35rem; }
  body.kit-custom-template .kit-tc[data-tc] .kit-tc__nav .kit-tc__product.is-active:focus-visible { outline-color: var(--kf-brand-accent, #feff00); }

  body.kit-custom-template .kit-tc[data-tc] .kit-tc__nav .kit-tc__product-title,
  body.kit-custom-template .kit-tc--games[data-tc] .kit-tc__nav .kit-tc__product-title {
    background: none;
    color: var(--kf-brand-background, #051545);
    font-size: 1.75rem;
    padding: 0;
  }
  body.kit-custom-template .kit-tc[data-tc] .kit-tc__nav .kit-tc__product.is-active .kit-tc__product-title { color: var(--kf-brand-text, #f0e7d5); padding-right: 4.5rem; }

  body.kit-custom-template .kit-tc[data-tc] .kit-tc__nav .kit-tc__product-tag { color: var(--kf-brand-background, #051545); font-size: 0.9rem; opacity: 1; }
  body.kit-custom-template .kit-tc[data-tc] .kit-tc__nav .kit-tc__product.is-active .kit-tc__product-tag { color: var(--kf-brand-text, #f0e7d5); }

  /* chevron on the other tiles, check + "Current" on the current one */
  body.kit-custom-template .kit-tc[data-tc] .kit-tc__nav .kit-tc__product::after {
    border-right: 0.2rem solid var(--kf-brand-background, #051545);
    border-top: 0.2rem solid var(--kf-brand-background, #051545);
    content: "";
    height: 0.6rem;
    position: absolute;
    right: 1.2rem;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    width: 0.6rem;
  }
  body.kit-custom-template .kit-tc[data-tc] .kit-tc__nav .kit-tc__product.is-active::after { display: none; }

  body.kit-custom-template .kit-tc[data-tc] .kit-tc__nav .kit-tc__product.is-active .kit-tc__product-current {
    align-items: center;
    color: var(--kf-brand-text, #f0e7d5);
    display: flex;
    font-size: 0.95rem;
    gap: 0.3rem;
    position: absolute;
    right: 1rem;
    top: 0.9rem;
  }
  .kit-tc__product-current svg { display: block; height: 1rem; width: 1rem; }

  /* tab: square, yellow, navy arrow (white would vanish on yellow); anchored to the bottom-left corner, the card pops up from it */
  .kit-tc .kit-tc__drawer-tab {
    -webkit-appearance: none;
    appearance: none;
    align-items: center;
    background: var(--kf-brand-accent, #feff00);
    border: 0;
    border-radius: 0 0.6rem 0 0;
    bottom: env(safe-area-inset-bottom, 0px);
    color: var(--kf-brand-background, #051545);
    cursor: pointer;
    display: flex;
    height: var(--tc-tab);
    justify-content: center;
    left: 0;
    padding: 0;
    position: fixed;
    width: var(--tc-tab);
    z-index: 72;
  }

  /* keep the tab yellow in every state (beat Astra's element-level button:hover) */
  .kit-tc .kit-tc__drawer-tab:hover,
  .kit-tc .kit-tc__drawer-tab:focus { background: var(--kf-brand-accent, #feff00); color: var(--kf-brand-background, #051545); }
  .kit-tc .kit-tc__drawer-tab:focus-visible { outline: 0.2rem solid var(--kf-brand-background, #051545); outline-offset: -0.4rem; }

  /* arrow points up (the card opens upward), flips down while open */
  .kit-tc__drawer-tab svg { display: block; height: 1.65rem; transform: rotate(-90deg); transition: transform var(--tc-dur) var(--tc-ease); width: 1.65rem; }
  .kit-tc.is-drawer-open .kit-tc__drawer-tab svg { transform: rotate(90deg); }

  /* the tab is fixed in the bottom-left corner: lift the footer content above it so the footer email stays tappable at the end of the page */
  body.kit-custom-template .kit-site-footer { padding-bottom: calc(3.5rem + env(safe-area-inset-bottom, 0px)); }

  /* picking a product scrolls the list into view (tools-catalog.js): leave a little air above the ticker */
  .kit-tc__panels { scroll-margin-top: 0.75rem; }

  /* transparent catcher: a tap outside the card closes it, the page stays undimmed (mockup) */
  .kit-tc .kit-tc__scrim { background: transparent; display: block; inset: 0; position: fixed; z-index: 70; }
  .kit-tc .kit-tc__scrim[hidden] { display: none; }
}

/* bounce on open and close: a damped spring (overshoots ~8 % and settles) where linear() is supported, a back-out curve elsewhere */
@supports (transition-timing-function: linear(0, 1)) {
  @media (max-width: 820px) { .kit-tc { --tc-ease: linear(0, 0.052, 0.177, 0.338, 0.506, 0.664, 0.799, 0.906, 0.985, 1.038, 1.068, 1.082, 1.083, 1.075, 1.063, 1.049, 1.035, 1.023, 1.013, 1.005, 0.999, 0.996, 0.994, 0.993, 0.993, 0.994, 1); } }
}

/* reminder while the menu is folded (tools-catalog.js adds .is-nudging every 5-10 s): the arrow jumps in scale twice, quick */
@keyframes kit-tc-tab-nudge {
  0%, 100% { scale: 1; }
  16% { scale: 1.6; }
  34% { scale: 1; }
  56% { scale: 1.6; }
  76% { scale: 1; }
}
.kit-tc__drawer-tab.is-nudging svg { animation: kit-tc-tab-nudge 0.6s ease-out 1; }

@media (max-width: 520px) {
  .kit-tc__stores { gap: 0.3rem; }
  .kit-tc__stores .kit-tc__cta { font-size: 0.66rem; letter-spacing: 0.03em; padding: 0.12rem 0.5rem; }
  .kit-tc__feature-media { aspect-ratio: 8 / 3; }
}

@media (prefers-reduced-motion: reduce) {
  .kit-tc * { transition: none !important; }
  .kit-tc .kit-tc__cta.is-glitching { animation: none; }
  .kit-tc .kit-tc__drawer-tab.is-nudging svg { animation: none; }
}
