/* ---------------------------------------------------------------------------
   Landing page and /company (renderHomeV2.mjs). Everything is scoped under `.kh`.

   Values follow the designer's code export (`index.html`): the same sizes,
   spacing, type and motion, at the same breakpoints. Like the export, the root
   inherits 16px and `line-height: normal`, and an element gets only the sizes
   and line-heights the export gives it.

   The document shell still loads marketing.css, whose rules are all `.mkt`
   scoped and aimed at the old pages: a black page, VT323 labels, a sticky
   <header>, a `.field` that is a boxed uppercase input. This sheet loads after
   it and shares nothing with it by name (every class here is `kh-`), apart from
   the `field` class staticEntry's waitlist handler looks for, which is
   re-styled below at higher specificity. There is no <header> element on the
   page (the bar is role="banner"), because marketing.css and initMarketing
   both act on <header>.

   Layouts, by viewport width, from one DOM:
     below 768   mobile    single column, sideways strips
     768 - 1099  tablet    32px gutters, 2-column grids
     1100 up     desktop   1440 max, 50px gutters, 3-column grids
   --------------------------------------------------------------------------- */

.kh {
  --kh-font-sans: 'IBM Plex Sans', system-ui, sans-serif;
  --kh-font-mono: 'IBM Plex Mono', ui-monospace, monospace;

  --kh-bg: #111110;
  --kh-bg-footer: #000000;
  --kh-panel: #141413;
  --kh-card: #161615;
  --kh-card-hover: #1c1c1b;
  --kh-panel-2: #1A1A19;
  --kh-field: #0E0E0D;
  --kh-text: #EDEBE6;
  --kh-text-soft: #CFCDC7;
  --kh-text-muted: #8a8883;
  --kh-text-dim: #9B9993;
  --kh-text-faint: #6f6d68;
  --kh-line: #232322;
  --kh-line-row: #2A2927;
  --kh-line-input: #2E2D2A;
  --kh-line-strong: #3A3936;
  --kh-stroke: #CFCDC7;

  --kh-ease: cubic-bezier(.2, .7, .2, 1);

  --kh-max: 1440px;
  --kh-gutter: 20px;
  /* Space above a section and above a sub-section of the engine chapter. */
  --kh-sec-top: 88px;
  --kh-sub-top: 64px;
  /* The one gap between columns and cards, everywhere. */
  --kh-gap: 12px;
  /* Space between a section heading and its content. */
  --kh-head-gap: 24px;

  display: block;
  background: var(--kh-bg);
  color: var(--kh-text);
  font-family: var(--kh-font-sans);
  font-size: 16px;
  font-weight: 400;
  line-height: normal;
  text-rendering: auto;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

@media (min-width: 768px) {
  .kh { --kh-gutter: 32px; --kh-sec-top: 112px; --kh-sub-top: 80px; --kh-gap: 16px; --kh-head-gap: 40px; }
}
@media (min-width: 1100px) {
  .kh { --kh-gutter: 50px; --kh-sec-top: 128px; --kh-sub-top: 96px; }
}

:root:has(.kh) { scroll-padding-top: 72px; }
@media (min-width: 768px) { :root:has(.kh) { scroll-padding-top: 88px; } }
@media (prefers-reduced-motion: no-preference) {
  :root:has(.kh) { scroll-behavior: smooth; }
}

/* --- reset ---------------------------------------------------------------- */

/* :where() keeps these at zero specificity, so any single class below wins
   (a plain `.kh button` would out-rank `.kh-q`'s font-size). */
.kh *, .kh *::before, .kh *::after { box-sizing: border-box; }
:where(.kh) :is(h1, h2, h3, h4, p, ul, li) { margin: 0; padding: 0; }
:where(.kh) ul { list-style: none; }
:where(.kh) a { color: inherit; text-decoration: none; }
:where(.kh) button {
  font: inherit; color: inherit; background: none; border: 0; padding: 0;
  text-align: inherit; cursor: pointer; -webkit-appearance: none; appearance: none;
}
:where(.kh) :is(img, svg) { display: block; }
:where(.kh) img { max-width: 100%; }
.kh [hidden] { display: none !important; }
.kh :focus-visible { outline: 2px solid var(--kh-text); outline-offset: 3px; }

.kh-sr {
  position: absolute; 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;
}
.kh-skip {
  position: absolute; left: 8px; top: -64px; z-index: 40; padding: 10px 14px;
  border-radius: 6px; background: var(--kh-text); color: var(--kh-bg); font-weight: 500;
}
.kh-skip:focus { top: 8px; }

.kh-wrap { width: 100%; max-width: var(--kh-max); margin-inline: auto; padding-inline: var(--kh-gutter); }

.kh-label {
  font-family: var(--kh-font-mono); font-size: 11px; font-weight: 400;
  letter-spacing: .08em; text-transform: uppercase; color: var(--kh-text-muted);
}
.kh-g { color: var(--kh-text-muted); }

/* --- type ----------------------------------------------------------------- */

.kh-h1 { font-size: 32px; line-height: 1.1; font-weight: 500; letter-spacing: -.025em; }
.kh-h-intro { font-size: 26px; line-height: 1.1; font-weight: 500; letter-spacing: -.03em; }
.kh-h2 { font-size: 24px; line-height: 1.2; font-weight: 500; letter-spacing: -.015em; }
.kh-h3 { font-size: 19px; line-height: 1.2; font-weight: 500; letter-spacing: -.015em; }
.kh-card-title { font-size: 17px; font-weight: 500; letter-spacing: -.01em; }
.kh-beta {
  display: inline-block; margin-left: 10px; padding: 3px 7px; vertical-align: 2px;
  border: 1px solid var(--kh-stroke); border-radius: 4px; font-size: 10px; line-height: 1;
}
.kh-body, .kh-lede { font-size: 15px; line-height: 1.5; color: var(--kh-text-muted); }

@media (min-width: 768px) {
  .kh-h1 { font-size: 52px; line-height: 1.08; letter-spacing: -.03em; }
  .kh-h-intro { font-size: 40px; line-height: 1.12; letter-spacing: -.025em; }
  .kh-h2 { font-size: 30px; line-height: 1.22; }
  .kh-h3 { font-size: 22px; line-height: 1.22; }
}

/* --- shared controls ------------------------------------------------------ */

.kh-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: 6px;
  font-size: 14px; font-weight: 500; white-space: nowrap;
  transition: opacity .2s;
}
.kh-btn-solid { background: var(--kh-text); color: var(--kh-bg); }
.kh-btn-outline { border: 1px solid var(--kh-line-strong); }
.kh-btn:hover { opacity: .85; }

/* --- nav bar --------------------------------------------------------------- */

.kh-bar {
  position: sticky; top: 8px; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  width: calc(100% - 16px); max-width: 1340px;
  height: 52px; margin: 8px auto -60px; padding: 0 8px 0 14px;
  border-radius: 6px;
  background: rgba(28, 27, 26, .78);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: 0 0 0 1px rgba(237, 235, 230, .07), 0 12px 30px -12px rgba(0, 0, 0, .6);
}
.kh-logo { display: flex; align-items: center; }
.kh-logo img { display: block; width: auto; height: 15px; }
.kh-bar-actions { display: flex; align-items: center; gap: 8px; }
.kh-bar-cta { height: auto; padding: 8px 12px; font-size: 13px; font-weight: 600; }
/* 44px hit area around a 33px button */
.kh-bar-cta::after { content: ""; position: absolute; inset: -6px 0; }
@media (min-width: 768px) {
  .kh-bar { top: 14px; width: calc(100% - 48px); height: 56px; margin: 14px auto -70px; padding: 0 10px 0 22px; }
  .kh-bar-cta { height: 36px; padding: 0 14px; font-size: 14px; }
  .kh-bar-cta::after { display: none; }
}

/* --- hero ------------------------------------------------------------------ */

.kh-hero { padding-top: 92px; }
.kh-hero .kh-wrap { display: flex; flex-direction: column; gap: 20px; }

/* The square panel: a stretched background and a framed screenshot. */
.kh-stage {
  position: relative; display: flex; align-items: center; justify-content: center;
  aspect-ratio: 1 / 1; overflow: hidden; border-radius: 4px; background: var(--kh-panel);
}
.kh-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.kh-shot {
  position: relative; display: block; width: var(--kh-shot-w, 86%); padding: 2px;
  background: rgba(237, 235, 230, .12); box-shadow: 0 30px 50px -24px rgba(0, 0, 0, .7);
  transition: transform .5s var(--kh-ease);
}
.kh-shot img { width: 100%; height: auto; }
.kh-stage-hero { aspect-ratio: 4 / 3; --kh-shot-w: 86%; }

.kh-caps { display: flex; flex-direction: column; gap: 16px; }
.kh-caps li { display: flex; flex-direction: column; gap: 3px; }
.kh-caps strong { font-size: 15px; font-weight: 500; }
.kh-caps span { font-size: 14px; line-height: 1.45; color: var(--kh-text-muted); }

@media (min-width: 768px) {
  .kh-hero { padding-top: 128px; }
  .kh-hero .kh-wrap { display: block; }
  .kh-stage-hero { aspect-ratio: 16 / 8; --kh-shot-w: 58%; margin-top: 40px; }
  .kh-caps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 24px; }
  .kh-caps strong { font-weight: 600; }
}

/* --- section rhythm, intro line ---------------------------------------------- */

.kh-intro, .kh-sec, .kh-wl-sec { padding-top: var(--kh-sec-top); }
.kh-sub { padding-top: var(--kh-sub-top); }
.kh-sub .kh-h3 { margin-bottom: var(--kh-head-gap); }

.kh-intro .kh-wrap { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--kh-gap); }
.kh-h-intro { grid-column: 1 / -1; }

@media (min-width: 1100px) {
  .kh-h-intro { grid-column: 1 / span 9; }
}

/* --- our plugins -------------------------------------------------------------- */

.kh-plugins { display: flex; flex-direction: column; }
.kh-plugin-grid { order: 2; display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; margin-top: 20px; }
.kh-plugins-cta { order: 3; align-self: flex-start; margin-top: 24px; }
.kh-plugin { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.kh-plugin .kh-card-text { margin-top: -10px; font-size: 14px; line-height: 1.45; color: var(--kh-text-muted); }

@media (min-width: 768px) {
  .kh-plugins { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--kh-gap); align-items: center; }
  .kh-plugins .kh-h2 { grid-column: 1 / span 7; }
  .kh-plugins-cta { order: 0; grid-column: 8 / span 5; justify-self: end; align-self: center; margin-top: 0; }
  .kh-plugin-grid { order: 0; grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px var(--kh-gap); margin-top: var(--kh-head-gap); }
  .kh-plugin { gap: 18px; }
  .kh-plugin .kh-card-text { margin-top: -12px; }
}
@media (min-width: 1100px) {
  .kh-plugin-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
/* The screenshot lifts when its card is hovered. */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .kh-plugin:hover .kh-shot { transform: translateY(-6px); }
}

/* --- music engine ---------------------------------------------------------------- */

.kh-engine { margin-top: var(--kh-sec-top); }
.kh-engine-in { display: flex; flex-direction: column; align-items: center; text-align: center; }
.kh-mark {
  width: 300px; height: 300px; object-fit: cover;
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 48%, transparent 70%);
  mask-image: radial-gradient(circle at 50% 50%, #000 48%, transparent 70%);
}
.kh-engine .kh-h2 { margin-top: -10px; }
.kh-engine .kh-body { margin-top: 14px; max-width: none; font-size: 14px; }

@media (min-width: 768px) {
  .kh-mark { width: 420px; height: 420px; }
  .kh-engine .kh-h2 { margin-top: -14px; }
  .kh-engine .kh-body { max-width: 600px; font-size: 15px; }
}

/* --- make your own sample pack ----------------------------------------------------- */

.kh-pack-panel { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 14px; align-items: center; }
.kh-pack-cover-wrap { width: 88px; height: 88px; overflow: hidden; border-radius: 4px; background: var(--kh-panel); }
.kh-pack-cover { width: 100%; height: 100%; object-fit: cover; }
.kh-pack-side { display: contents; }

/* The full prompt sits invisibly under the typed one so the block never
   changes height while typing. */
.kh-quote { display: grid; min-width: 0; font-size: 16px; line-height: 1.25; font-weight: 500; letter-spacing: -.01em; }
.kh-quote > span { grid-area: 1 / 1; }
.kh-quote-full { opacity: 0; }
.kh-caret { display: none; margin-left: .1em; animation: kh-blink 1s steps(1) infinite; }
.kh-typed.is-typing .kh-caret { display: inline; }
@keyframes kh-blink { 50% { opacity: 0; } }

.kh-rows { grid-column: 1 / -1; margin-top: 6px; border-bottom: 1px solid var(--kh-line-row); }
.kh-rows li { border-top: 1px solid var(--kh-line-row); }
.kh-row {
  display: grid; grid-template-columns: 22px minmax(0, 1fr) auto 48px; column-gap: 12px; align-items: center;
  width: 100%; min-height: 48px; font-size: 14px; color: var(--kh-text);
}
.kh-ind { display: flex; align-items: center; }
.kh-rname { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kh-rkind { font-family: var(--kh-font-mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--kh-text-faint); }
.kh-rlen { font-family: var(--kh-font-mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--kh-text-muted); text-align: right; }

.kh-eq { display: none; gap: 2px; align-items: flex-end; height: 12px; }
.kh-eq i { display: block; width: 2px; height: 12px; background: currentColor; transform-origin: bottom; animation: kh-eq .9s ease-in-out infinite; }
.kh-eq i:nth-child(2) { animation-delay: .2s; }
.kh-eq i:nth-child(3) { animation-delay: .45s; }
.kh [aria-pressed="true"] > .kh-ind .kh-eq { display: inline-flex; }
.kh [aria-pressed="true"] > .kh-ind .kh-tri { display: none; }
@keyframes kh-eq { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) {
  .kh-eq i { animation: none; transform: scaleY(.65); }
  .kh-caret { animation: none; }
}

/* Picking a pack: the prompt types while the cover and rows are held dimmed and
   displaced, then they ease in, the rows 70 ms apart. */
.kh-pack-cover { transition: opacity .5s ease, transform .9s var(--kh-ease); }
.kh-rows li { transition: opacity .4s ease calc(min(var(--i, 0), 6) * 70ms), transform .4s var(--kh-ease) calc(min(var(--i, 0), 6) * 70ms); }
.kh-pack-panel[data-phase="typing"] .kh-pack-cover { opacity: .35; transform: scale(1.04); transition: none; }
.kh-pack-panel[data-phase="typing"] .kh-rows li { opacity: 0; transform: translateY(8px); transition: none; }
@media (prefers-reduced-motion: reduce) {
  .kh-pack-cover, .kh-rows li { transition: none; }
}

/* Pack cards under the pack: thumbnail, name and type in a bordered card; the
   pack on view gets a light border and a lifted fill. Phones scroll them sideways. */
.kh-picker {
  display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none;
  margin: 24px calc(var(--kh-gutter) * -1) 0; padding: 2px var(--kh-gutter);
}
.kh-picker::-webkit-scrollbar { display: none; }
.kh-pick-tile {
  position: relative; flex: 0 0 220px; display: flex; align-items: center;
  border: 1px solid var(--kh-line); border-radius: 6px; background: var(--kh-panel);
  transition: border-color .2s, background .2s;
}
.kh-pick-tile:hover { border-color: var(--kh-line-strong); }
.kh-pick-tile:has(.kh-pick[aria-pressed="true"]) { border-color: var(--kh-text); background: var(--kh-panel-2); }
.kh-pick { display: flex; flex: 1; min-width: 0; align-items: center; gap: 14px; padding: 8px; text-align: left; }
/* The button's hit area covers the whole card; the download link sits above it. */
.kh-pick::after { content: ""; position: absolute; inset: 0; border-radius: 6px; }
.kh-pick-img { flex: 0 0 auto; width: 56px; height: 56px; overflow: hidden; border-radius: 3px; background: var(--kh-panel-2); }
.kh-pick-img img { width: 100%; height: 100%; object-fit: cover; }
.kh-pick-text { min-width: 0; }
.kh-pick-name { display: block; overflow: hidden; font-size: 15px; font-weight: 500; white-space: nowrap; text-overflow: ellipsis; color: var(--kh-text-soft); transition: color .2s; }
.kh-pick[aria-pressed="true"] .kh-pick-name, .kh-pick-tile:hover .kh-pick-name { color: var(--kh-text); }
.kh-pick-type { display: block; margin-top: 4px; font-size: 10px; color: var(--kh-text-faint); }
.kh-pick-dl {
  position: relative; z-index: 1; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; margin-right: 6px; color: var(--kh-text-muted); transition: color .15s;
}
.kh-pick-dl:hover { color: var(--kh-text); }
.kh-pick:focus-visible { outline: none; }
.kh-pick:focus-visible::after { outline: 2px solid var(--kh-text); outline-offset: 2px; }

/* Long real prompts make the side column tall, and a stretched square would
   then run under it. Tablet caps the cover at the size the design draws. */
@media (min-width: 768px) and (max-width: 1099px) {
  .kh-pack-panel .kh-pack-cover-wrap { grid-column: 1 / span 5; align-self: start; width: 100%; max-width: 309px; }
}

@media (min-width: 768px) {
  .kh-pack-panel { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 0 var(--kh-gap); align-items: stretch; }
  .kh-pack-cover-wrap { grid-column: 1 / span 4; width: auto; height: auto; aspect-ratio: 1 / 1; }
  /* height:0 plus min-height:100% takes the side column out of the row's sizing,
     so the cover alone sets the height and the list fills whatever the prompt leaves. */
  .kh-pack-side { display: flex; flex-direction: column; grid-column: 6 / span 7; height: 0; min-height: 100%; }
  .kh-quote { margin-bottom: 22px; font-family: var(--kh-font-mono); font-size: 15px; line-height: 1.5; font-weight: 400; letter-spacing: 0; }
  .kh-rows { margin-top: 0; border-bottom: 0; }
  .kh-rows li { border-top-color: var(--kh-line); }
  .kh-row {
    grid-template-columns: 28px minmax(0, 1fr) 110px 70px; column-gap: 0; min-height: 0; padding: 12px 0;
    font-size: 15px; color: var(--kh-text-soft);
  }
  .kh-row:hover, .kh-row[aria-pressed="true"] { color: var(--kh-text); }
  .kh-rlen { font-size: 11px; color: var(--kh-text-faint); }
  .kh-picker { gap: var(--kh-gap); margin-top: 40px; }
}
/* Desktop: all five cards in one row, sharing the width. */
@media (min-width: 1100px) {
  .kh-picker { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin-right: 0; margin-left: 0; padding: 2px 0; overflow: visible; }
  .kh-pick-tile { min-width: 0; }
}

/* --- make more than loops ---------------------------------------------------------- */

.kh-groups { display: flex; flex-direction: column; gap: 20px; }
.kh-group { display: flex; flex-direction: column; gap: 10px; }
.kh-ghead { display: flex; align-items: center; justify-content: space-between; }
.kh-glabel { font-size: 11px; color: var(--kh-text-muted); }
.kh-arrows { display: none; }

/* Mobile: one strip of 314px cards per type, every example, no arrows. */
.kh-strip {
  display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none;
  margin-right: calc(var(--kh-gutter) * -1); padding-right: var(--kh-gutter);
}
.kh-strip::-webkit-scrollbar { display: none; }
.kh-card {
  flex: 0 0 314px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start;
  gap: 14px 8px; padding: 16px;
  border-radius: 4px; background: var(--kh-card);
}
/* The drawing seeks: click or drag to play from there. While its clip plays the
   drawing dims, the played part (a clipped copy, .kh-vis-lit) shows bright, and
   a line marks the playhead. homeV2.ts sets the clip width and the line. */
.kh-vis { grid-column: 1 / -1; width: 100%; height: 76px; cursor: pointer; touch-action: pan-y; color: var(--kh-stroke); }
.kh-vis-base, .kh-vis-lit { fill: none; stroke: currentColor; stroke-width: 1; vector-effect: non-scaling-stroke; }
.kh-vis-fill .kh-vis-base, .kh-vis-fill .kh-vis-lit { fill: currentColor; stroke: none; }
.kh-vis-fill { color: rgba(207, 205, 199, .8); }
.kh-vis-lit { display: none; color: #fff; }
.kh-vis-head { display: none; stroke: #fff; stroke-width: 1; vector-effect: non-scaling-stroke; }
.kh-vis.is-live { color: rgba(207, 205, 199, .38); }
.kh-vis.is-live .kh-vis-lit, .kh-vis.is-live .kh-vis-head { display: inline; }
.kh-play { position: relative; display: flex; align-items: flex-start; gap: 14px; text-align: left; }
/* 44px hit area around a 39px text block */
.kh-play::after { content: ""; position: absolute; inset: -3px 0; }
.kh-pi { flex: none; width: 14px; padding-top: 3px; font-size: 12px; }
.kh-pi-stop { display: none; }
.kh-play[aria-pressed="true"] .kh-pi-play { display: none; }
.kh-play[aria-pressed="true"] .kh-pi-stop { display: inline; }
.kh-ptext { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.kh-ptitle {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; min-height: 39px;
  font-family: var(--kh-font-mono); font-size: 13px; line-height: 1.5;
}
.kh-stem { font-family: var(--kh-font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--kh-text-muted); }

/* Tablet and up: one card per type, one example at a time, with arrows. */
@media (min-width: 768px) {
  .kh-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--kh-gap); }
  .kh-group {
    padding: 14px 16px 16px; gap: 14px; border-radius: 4px; background: var(--kh-card);
    min-width: 0; transition: background .2s;
  }
  .kh-group:hover { background: var(--kh-card-hover); }
  .kh-arrows { display: flex; align-items: center; }
  .kh-arrows button { width: 26px; height: 26px; font-size: 14px; color: var(--kh-text-muted); }
  .kh-arrows button:hover { color: var(--kh-text); }
  /* the export's `.lc-top .mono` out-ranks `.pos`: 11px, muted */
  .kh-count {
    display: inline-block; min-width: 44px; text-align: center;
    font-family: var(--kh-font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--kh-text-muted);
  }
  .kh-strip { display: block; margin: 0; padding: 0; overflow: visible; }
  .kh-card { display: none; padding: 0; background: none; }
  .kh-card.is-cur { display: grid; }
  .kh-vis { height: 84px; }
}
/* Five cards: two by two plus a full-width last one on tablet; three then two on desktop. */
@media (min-width: 768px) and (max-width: 1099px) {
  .kh-group:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (min-width: 1100px) {
  .kh-groups { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .kh-group { grid-column: span 2; }
  .kh-group:nth-child(4), .kh-group:nth-child(5) { grid-column: span 3; }
}

/* --- do more with every sound ------------------------------------------------------- */

.kh-rail {
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none;
  margin-inline: calc(var(--kh-gutter) * -1); padding-inline: var(--kh-gutter); scroll-padding-inline: var(--kh-gutter);
}
.kh-rail::-webkit-scrollbar { display: none; }
.kh-fcards { display: flex; gap: 16px; }
.kh-fcard { flex: 0 0 78%; display: flex; flex-direction: column; gap: 18px; scroll-snap-align: start; }
.kh-fcap { display: flex; flex-direction: column; gap: 4px; }
.kh-ftitle { font-size: 17px; font-weight: 500; }
.kh-fline { font-size: 14px; line-height: 1.45; color: var(--kh-text-muted); }

/* The panel: dark, hairline-ringed, with line art behind the animation. */
.kh-scene {
  position: relative; display: flex; align-items: center; justify-content: center;
  aspect-ratio: 1 / 1; overflow: hidden; border-radius: 4px;
  background: #121211; box-shadow: inset 0 0 0 1px #262523;
}
.kh-deco { position: absolute; inset: 0; width: 100%; height: 100%; }
@media (prefers-reduced-motion: reduce) {
  .kh-scene * { transition: none !important; }
}

@media (min-width: 768px) {
  .kh-fcard { flex-basis: 300px; }
}
/* Still a carousel on desktop: each card spans three of the 12 columns, so four
   sit on the grid and the fifth shows at the right edge. */
@media (min-width: 1100px) {
  .kh-fcards { gap: var(--kh-gap); }
  .kh-fcard { flex-basis: calc((100% - 3 * var(--kh-gap)) / 4); }
}

/* --- what you make is yours --------------------------------------------------------- */

.kh-license {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: start;
}
.kh-license .kh-lede { margin-top: 12px; max-width: 420px; }

.kh-checks li {
  display: grid; grid-template-columns: minmax(0, 1fr) 16px; gap: 4px 12px; align-items: center;
  padding: 18px 0; border-top: 1px solid var(--kh-line);
}
.kh-checks li:first-child { padding-top: 4px; border-top: 0; }
.kh-checks strong { font-size: 17px; font-weight: 500; }
.kh-checks span { grid-column: 1; grid-row: 2; font-size: 14px; color: var(--kh-text-muted); }
.kh-checks li > svg { grid-column: 2; grid-row: 1 / span 2; color: var(--kh-text); }

@media (min-width: 768px) {
  .kh-checks li { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) 16px; gap: 16px; }
  .kh-checks span { grid-column: auto; grid-row: auto; font-size: 15px; }
  .kh-checks li > svg { grid-column: auto; grid-row: auto; }
}
@media (min-width: 1100px) {
  .kh-license { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 0 var(--kh-gap); }
  .kh-license-head { grid-column: 1 / span 4; }
  .kh-checks { grid-column: 6 / span 7; }
}

/* --- questions ----------------------------------------------------------------------- */

.kh-faq-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--kh-gap); align-items: start; }
.kh-faq-grid .kh-h2 { grid-column: 1 / -1; }
.kh-faq { grid-column: 1 / -1; margin-top: 28px; border-bottom: 1px solid var(--kh-line); }
.kh-qa { border-top: 1px solid var(--kh-line); }
.kh-qa h3 { font-size: inherit; font-weight: inherit; }
.kh-q {
  display: flex; justify-content: space-between; gap: 16px; width: 100%; padding: 16px 0;
  font-size: 15px; text-align: left;
}
.kh-q-icon { flex: none; color: var(--kh-text-faint); }
.kh-q-icon::before { content: "+"; }
.kh-q[aria-expanded="true"] .kh-q-icon::before { content: "\2212"; }
.kh-a p { margin: 0 0 20px; max-width: 560px; font-size: 15px; line-height: 1.5; color: var(--kh-text-muted); }

@media (min-width: 768px) {
  .kh-q { padding: 20px 0; font-size: 17px; }
}
@media (min-width: 1100px) {
  .kh-faq-grid .kh-h2 { grid-column: 1 / span 4; }
  .kh-faq { grid-column: 6 / span 7; margin-top: 0; }
}

/* --- community ------------------------------------------------------------------------ */

.kh-tile-text { display: flex; flex-direction: column; gap: 2px; }
.kh-tile-title { font-size: 17px; font-weight: 500; }
.kh-tile-line { font-size: 13px; color: var(--kh-text-soft); }

/* Phones: link cards in a sideways strip, then the covers in two columns. */
.kh-tiles { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; margin: 28px calc(var(--kh-gutter) * -1) 0 0; padding-right: var(--kh-gutter); }
.kh-tiles::-webkit-scrollbar { display: none; }
.kh-tiles > li { flex: 0 0 260px; }
.kh-tile { display: flex; flex-direction: column; gap: 8px; cursor: default; }
.kh-tile-link { cursor: pointer; }
.kh-tile img { width: 260px; height: 170px; object-fit: cover; border-radius: 4px; }
.kh-tiles .kh-tile-shade { display: none; }
.kh-tiles .kh-tile-title { font-size: 14px; }
.kh-tiles .kh-tile-line { font-size: 12px; color: var(--kh-text-dim); }

.kh-made-label { margin-top: 24px; font-size: 15px; font-weight: 500; }
.kh-covers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.kh-a-c5 { display: none; }
.kh-cover {
  position: relative; display: block; width: 100%; aspect-ratio: 1 / 1; overflow: hidden;
  border-radius: 4px; background: var(--kh-panel-2); text-align: left; outline: 2px solid transparent; outline-offset: -2px;
}
.kh-cover[aria-pressed="true"] { outline-color: var(--kh-text); }
.kh-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.kh-cover .kh-tile-shade { display: block; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(10, 10, 10, 0) 55%, rgba(10, 10, 10, .75) 100%); }
.kh-cover .kh-tile-text { position: absolute; z-index: 2; left: 14px; right: 14px; bottom: 12px; }
.kh-cover .kh-tile-title { font-size: 15px; }

/* Tablet and up: the mosaic. 4 columns (three of the 12 each) by 3 rows,
   180px on tablet and 230px on desktop, link tiles and covers placed by name. */
@media (min-width: 768px) {
  .kh-made-label { display: none; }
  .kh-mosaic {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(3, 180px);
    grid-template-areas: 'p1 p1 c1 c2' 'p1 p1 c3 p3' 'c4 c5 p2 p3'; gap: var(--kh-gap); margin-top: var(--kh-head-gap);
  }
  .kh-tiles, .kh-covers { display: contents; }
  .kh-mosaic li { position: relative; min-width: 0; }
  .kh-a-p1 { grid-area: p1; } .kh-a-p2 { grid-area: p2; } .kh-a-p3 { grid-area: p3; }
  .kh-a-c1 { grid-area: c1; } .kh-a-c2 { grid-area: c2; } .kh-a-c3 { grid-area: c3; }
  .kh-a-c4 { grid-area: c4; } .kh-a-c5 { grid-area: c5; display: block; }

  .kh-tile, .kh-cover {
    position: absolute; inset: 0; display: block; width: 100%; height: 100%; aspect-ratio: auto;
    overflow: hidden; border-radius: 4px; background: var(--kh-panel-2);
  }
  .kh-tile img, .kh-cover img {
    position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 0; object-fit: cover;
    transition: transform .6s var(--kh-ease), filter .3s;
  }
  .kh-tile-link:hover img, .kh-cover:hover img { transform: scale(1.04); filter: brightness(1.08); }
  .kh-tiles .kh-tile-shade { display: block; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(10, 10, 10, 0) 55%, rgba(10, 10, 10, .75) 100%); }
  .kh-tiles .kh-tile-text { position: absolute; z-index: 2; left: 18px; right: 18px; bottom: 16px; }
  .kh-tiles .kh-tile-title { font-size: 17px; }
  .kh-tiles .kh-tile-line { font-size: 13px; color: var(--kh-text-soft); }
  /* the tiles clip their own overflow, so the ring sits inside */
  .kh-tile-link:focus-visible, .kh-cover:focus-visible { outline-offset: -3px; }
}
@media (min-width: 1100px) {
  .kh-mosaic { grid-template-rows: repeat(3, 230px); }
}
@media (prefers-reduced-motion: reduce) {
  .kh-tile img, .kh-cover img { transition: none; }
  .kh-tile-link:hover img, .kh-cover:hover img { transform: none; }
}

/* --- stay in the loop -------------------------------------------------------------------- */

.kh-wl { display: grid; grid-template-columns: minmax(0, 1fr); overflow: hidden; border-radius: 4px; background: var(--kh-panel-2); }
.kh-wl-stage {
  order: -1; position: relative; min-height: 200px; display: flex; align-items: center; justify-content: center;
  overflow: hidden; background: #151514;
}
.kh-wl-covers { position: relative; width: 240px; max-width: 400px; aspect-ratio: 1 / 1; }
.kh-wl-covers img {
  position: absolute; width: 62%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 4px;
  box-shadow: 0 28px 50px -20px rgba(0, 0, 0, .8);
}
.kh-wl-a { left: 0; top: 22%; z-index: 1; transform: rotate(-7deg); }
.kh-wl-b { left: 38%; top: 24%; z-index: 2; transform: rotate(6deg); }
.kh-wl-c { left: 19%; top: 4%; z-index: 3; transform: rotate(-1deg); }

.kh-wl-copy { display: flex; flex-direction: column; justify-content: center; gap: 20px; padding: 24px 20px 28px; }
.kh-wl-text .kh-lede { margin-top: 12px; max-width: 460px; }
.kh-wl-form { display: flex; flex-direction: column; gap: 12px; }
.kh-fine { font-family: var(--kh-font-mono); font-size: 11px; letter-spacing: .02em; color: var(--kh-text-muted); }
.kh-fine a { position: relative; text-decoration: underline; }
.kh-fine a::after { content: ""; position: absolute; inset: -14px -6px; }

/* staticEntry finds the email field by this class; marketing.css also styles
   it (a boxed, uppercase input), so the rules below out-rank that. */
.kh .kh-wl .field {
  display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 18px;
  border: 1px solid var(--kh-line-input); border-radius: 6px; background: var(--kh-field);
}
.kh .kh-wl .field:focus-within { border-color: var(--kh-text); }
.kh .kh-wl .field input {
  flex: 1 1 auto; min-width: 0; height: 44px; padding: 0; border: 0; outline: none; background: transparent;
  color: var(--kh-text); font: inherit; font-size: 16px; letter-spacing: normal; text-transform: none;
}
.kh .kh-wl .field input::placeholder { color: var(--kh-text-muted); }
.kh .kh-wl .field button {
  flex: none; height: 44px; padding: 0 16px; border-radius: 6px;
  background: var(--kh-text); color: var(--kh-bg); font-size: 13px; font-weight: 500; white-space: nowrap;
}
.kh .kh-wl .field button:hover { opacity: .85; }

@media (min-width: 768px) {
  .kh-wl { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
  .kh-wl-stage { order: 1; min-height: 420px; }
  .kh-wl-covers { width: 78%; }
  .kh-wl-copy { gap: 28px; padding: 40px; }
  .kh .kh-wl .field button { padding: 0 20px; font-size: 14px; }
}
@media (min-width: 1100px) {
  .kh-wl-copy { padding: 56px; }
}

/* --- about --------------------------------------------------------------------------------- */

.kh-about { padding-top: 92px; }
.kh-prose { max-width: 640px; display: flex; flex-direction: column; gap: 20px; }
.kh-prose .kh-h1 { margin-bottom: 12px; }
.kh-prose p { font-size: 17px; line-height: 1.55; color: var(--kh-text-dim); }
.kh-prose .kh-signoff { color: var(--kh-text); }
.kh-prose a { color: var(--kh-text); text-decoration: underline; text-underline-offset: 3px; }

@media (min-width: 768px) {
  .kh-about { padding-top: 128px; }
  .kh-prose { gap: 24px; }
  .kh-prose .kh-h1 { margin-bottom: 16px; }
  .kh-prose p { color: var(--kh-text-muted); }
  .kh-prose .kh-signoff { color: var(--kh-text); }
}

/* --- footer -------------------------------------------------------------------------------- */

.kh-foot { margin-top: var(--kh-sec-top); background: var(--kh-bg-footer); }
.kh-foot .kh-wrap { padding-top: 32px; padding-bottom: 28px; }
.kh-foot-top { display: flex; flex-direction: column; gap: 24px; }
.kh-foot-logo { display: block; align-self: flex-start; width: auto; height: 22px; }
.kh-foot-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; }
.kh-fcol { display: flex; flex-direction: column; gap: 11px; }
.kh-fcol ul { display: flex; flex-direction: column; gap: 11px; }
.kh-fh { font-size: 11px; color: var(--kh-text-faint); }
.kh-foot a, .kh-foot button { position: relative; font-size: 14px; color: #BDBBB5; transition: color .15s; }
/* 44px hit area around a 17px line */
.kh-foot a::after, .kh-foot button[data-cta]::after { content: ""; position: absolute; inset: -10px 0; }
.kh-foot a:hover, .kh-foot button:hover { color: var(--kh-text); }
/* The plugins are not out yet: their footer links say so on hover or focus. */
.kh-foot-plugin .kh-soon { margin-left: 8px; font-size: 12px; color: var(--kh-text-faint); opacity: 0; transition: opacity .15s; }
.kh-foot-plugin:hover .kh-soon, .kh-foot-plugin:focus-visible .kh-soon { opacity: 1; }
@media (hover: none) { .kh-foot-plugin .kh-soon { opacity: 1; } }
.kh-foot button[data-cta] { font: inherit; font-size: 14px; padding: 0; text-align: left; }
.kh-copy { margin-top: 24px; padding-top: 20px; border-top: 1px solid #1c1c1b; font-size: 12px; color: var(--kh-text-faint); }

@media (min-width: 768px) {
  .kh-foot .kh-wrap { padding-top: 56px; }
  /* Wordmark on the left, the three link columns beside it on the 12-column grid. */
  .kh-foot-top { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--kh-gap); align-items: start; }
  .kh-foot-logo { grid-column: 1 / span 4; height: 26px; }
  .kh-foot-cols { grid-column: 5 / -1; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px var(--kh-gap); }
  .kh-foot a::after, .kh-foot button[data-cta]::after { inset: -6px 0; }
}
@media (min-width: 1100px) {
  .kh-foot-cols { grid-column: 7 / -1; }
}

/* --- clip actions: web synth and download ------------------------------------------------ */

.kh-acts { display: flex; align-items: center; flex: none; }
.kh-act {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 6px; color: var(--kh-text-muted);
  transition: color .15s, background .15s;
}
/* 44px hit area around a 32px button */
.kh-act::after { content: ""; position: absolute; inset: -6px; }
.kh-act:hover { color: var(--kh-text); background: rgba(237, 235, 230, .08); }
/* A song download fetching (homeV2.ts initDownloads). */
.kh-act[aria-busy="true"] { opacity: .45; cursor: progress; }

/* On a card the buttons sit to the right of the prompt, clear of the drawing. */
.kh-card { position: relative; }
.kh-card > .kh-acts { grid-column: 2; grid-row: 2; margin-top: -7px; }
.kh-card > .kh-play { grid-column: 1; grid-row: 2; }

/* "Download pack", for the pack on view, in the More packs line. */

/* --- pack lists: every sound, scrolling inside a fixed height. Five and a half rows, so the cut-off row shows there is more --- */

.kh { --kh-row-h: 49px; --kh-rows-max: 270px; }
@media (min-width: 768px) {
  .kh { --kh-row-h: 44px; --kh-rows-max: none; }
  .kh-rows { flex: 1 1 0; min-height: 0; }
}
.kh-rows li { display: flex; align-items: center; height: var(--kh-row-h); }
.kh-rows .kh-row { flex: 1; min-width: 0; width: auto; height: 100%; min-height: 0; }
.kh-rows .kh-acts { width: 36px; justify-content: flex-end; }
.kh-rows {
  /* No overscroll containment: at either end of the list, or over a list too
     short to scroll, the wheel carries on scrolling the page. */
  max-height: var(--kh-rows-max); overflow-x: hidden; overflow-y: auto;
}
/* Chrome ignores the ::-webkit-scrollbar rules below when scrollbar-width is set, so only Firefox gets it. */
@supports not selector(::-webkit-scrollbar) {
  .kh-rows { scrollbar-width: thin; scrollbar-color: var(--kh-line-strong) transparent; }
}
.kh-rows::-webkit-scrollbar { width: 6px; height: 0; }
.kh-rows::-webkit-scrollbar-corner { background: transparent; }
.kh-rows::-webkit-scrollbar-thumb { border-radius: 3px; background: rgba(237, 235, 230, .24); }
.kh-rows:focus-visible { outline-offset: -2px; }

/* --- player bar ------------------------------------------------------------------------------ */

/* The glass pill from the previous landing page: same size, plate, glow and
   hairline progress along its top edge. */
/* Room for the fixed bar goes inside the footer, so the footer colour runs to the bottom. */
.kh[data-pb-on] .kh-foot .kh-wrap { padding-bottom: calc(var(--kh-pb-h, 0px) + 40px); }
.kh-pb {
  position: fixed; left: 50%; z-index: 50; transform: translateX(-50%);
  /* above the consent banner, which publishes its height on <html> */
  bottom: calc(var(--consent-banner-h, 0px) + 24px);
  width: 60vw; max-width: calc(100vw - 32px); overflow: hidden; border-radius: 999px;
  --c1: rgba(122, 150, 214, .85); --c2: rgba(128, 196, 190, .8);
  background: rgba(150, 152, 168, .1);
  -webkit-backdrop-filter: blur(48px) saturate(175%); backdrop-filter: blur(48px) saturate(175%);
  box-shadow: 0 12px 44px -14px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .14), inset 0 -1px 0 rgba(255, 255, 255, .04);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .kh-pb { background: #1b1b21; }
}

.kh-pb-glow { position: absolute; inset: 0; overflow: hidden; pointer-events: none; opacity: 0; transition: opacity .5s ease; }
.kh-pb.on .kh-pb-glow { opacity: 1; }
.kh-pb-glow i { position: absolute; top: -170%; height: 440%; width: 130%; display: block; }
.kh-pb-glow i span { display: block; width: 100%; height: 100%; opacity: .2; transform: scale(.98); }
.kh-pb-glow .g1 { left: -45%; animation: kh-pb-drift1 19s ease-in-out infinite alternate; }
.kh-pb-glow .g1 span { background: radial-gradient(closest-side, var(--c1) 0%, transparent 82%); background: radial-gradient(closest-side, var(--c1) 0%, color-mix(in srgb, var(--c1) 58%, transparent) 45%, transparent 100%); }
.kh-pb-glow .g2 { left: 15%; animation: kh-pb-drift2 27s ease-in-out infinite alternate; }
.kh-pb-glow .g2 span { background: radial-gradient(closest-side, var(--c2) 0%, transparent 82%); background: radial-gradient(closest-side, var(--c2) 0%, color-mix(in srgb, var(--c2) 58%, transparent) 45%, transparent 100%); }
@keyframes kh-pb-drift1 { from { transform: translate3d(-9%, 4%, 0) scale(1); } to { transform: translate3d(24%, -4%, 0) scale(1.25); } }
@keyframes kh-pb-drift2 { from { transform: translate3d(14%, -3%, 0) scale(1.2); } to { transform: translate3d(-17%, 5%, 0) scale(.95); } }

.kh-pb-seek { position: absolute; left: 0; right: 0; top: 0; z-index: 3; height: 12px; cursor: pointer; touch-action: none; }
.kh-pb-seek:focus-visible { outline: 0; }
.kh-pb-seek:focus-visible .kh-pb-prog { height: 3px; }
.kh-pb-prog { position: absolute; left: 0; right: 0; top: 0; height: 1.5px; overflow: hidden; background: rgba(255, 255, 255, .1); transition: height .12s; }
.kh-pb-seek:hover .kh-pb-prog { height: 3px; }
.kh-pb-prog i { display: block; height: 100%; background: rgba(255, 255, 255, .85); transform: scaleX(0); transform-origin: 0 50%; }

.kh-pb-in { position: relative; display: flex; align-items: center; gap: 13px; padding: 11px 18px 9px; }
.kh-pb-jump, .kh-pb-name { padding: 0; cursor: pointer; color: inherit; background: none; border: 0; transition: opacity .15s, color .15s; }
.kh-pb-jump { flex: none; display: flex; align-items: center; }
.kh-pb-jump:hover { opacity: .7; }
.kh-pb-logo { display: block; width: auto; height: 17px; opacity: .9; }
.kh-pb-tx { flex: none; display: flex; align-items: center; gap: 4px; }
.kh-pb-btn { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; color: rgba(255, 255, 255, .7); background: none; border: 0; cursor: pointer; transition: color .15s; }
.kh-pb-btn:hover, .kh-pb-play { color: #fff; }
.kh-pb-btn svg { display: block; width: 15px; height: 15px; fill: currentColor; }
.kh-pb-prev svg, .kh-pb-next svg { fill: none; }
.kh-pb-i-pause { display: none; }
.kh-pb-btn[data-playing] .kh-pb-i-play { display: none; }
.kh-pb-btn[data-playing] .kh-pb-i-pause { display: inline; }
.kh-pb-name { flex: 1 1 auto; min-width: 0; overflow: hidden; font-family: var(--kh-font-mono); font-size: 12px; color: #d0d0d0; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.kh-pb-name:hover { color: #fff; }
.kh-pb[data-quoted] .kh-pb-name:not(:empty)::before { content: "\201C"; }
.kh-pb[data-quoted] .kh-pb-name:not(:empty)::after { content: "\201D"; }
.kh-pb-time { flex: none; font-family: var(--kh-font-mono); font-size: 11px; font-variant-numeric: tabular-nums; color: rgba(255, 255, 255, .55); }

@media (max-width: 820px) {
  .kh-pb { bottom: calc(var(--consent-banner-h, 0px) + 16px); width: auto; }
  .kh-pb-in { padding: 10px 12px 8px; gap: 6px; }
  .kh-pb-jump { justify-content: center; width: 34px; height: 34px; }
  .kh-pb-name, .kh-pb-time { display: none; }
  .kh-pb-btn { width: 34px; height: 34px; }
  .kh-pb-btn svg { width: 16px; height: 16px; }
  .kh-pb-logo { height: 18px; }
  .kh-pb-seek { pointer-events: none; touch-action: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .kh-pb-glow { transition: none; }
  .kh-pb-glow i { animation: none; }
  .kh-pb-glow i span { opacity: .5; transform: none; }
}

/* --- Khora goes where you are ------------------------------------------------------------------ */

/* Tabs on the left, a line drawing of the selected place on the right. The
   selected tab's bar fills over 7 s, then the next tab takes over (homeV2.ts). */
.kh-go { display: flex; flex-direction: column; gap: 28px; }
.kh-go-tabs { display: flex; flex-direction: column; border-bottom: 1px solid var(--kh-line); }
.kh-go-tab { position: relative; display: block; width: 100%; padding: 18px 0 20px; text-align: left; border-top: 1px solid var(--kh-line); }
.kh-go-bar { position: absolute; top: -1px; left: 0; right: 0; height: 1px; overflow: hidden; }
.kh-go-bar i { display: block; width: 100%; height: 100%; background: var(--kh-text); transform: scaleX(0); transform-origin: left; }
.kh-go-tab[aria-selected="true"] .kh-go-bar i { animation: kh-go-fill 7s linear forwards; }
.kh-go:not([data-run]) .kh-go-tab[aria-selected="true"] .kh-go-bar i,
.kh-go:hover .kh-go-tab[aria-selected="true"] .kh-go-bar i,
.kh-go:has(:focus-visible) .kh-go-tab[aria-selected="true"] .kh-go-bar i { animation-play-state: paused; }
/* A tab the visitor chose stays: its bar shows full (homeV2.ts initGo). */
.kh-go[data-held] .kh-go-tab[aria-selected="true"] .kh-go-bar i { animation: none; transform: scaleX(1); }
@keyframes kh-go-fill { to { transform: scaleX(1); } }
.kh-go-title { display: block; font-size: 17px; font-weight: 500; color: var(--kh-text-faint); transition: color .2s; }
.kh-go-tab:hover .kh-go-title, .kh-go-tab[aria-selected="true"] .kh-go-title { color: var(--kh-text); }
.kh-go-text { display: none; margin-top: 8px; max-width: 460px; font-size: 14px; line-height: 1.5; color: var(--kh-text-muted); }
.kh-go-tab[aria-selected="true"] .kh-go-text { display: block; }
.kh-go-tab:focus-visible { outline-offset: 4px; }

.kh-go-stage { border: 1px solid var(--kh-line); border-radius: 6px; padding: 16px; background: var(--kh-bg); }
.kh-go-panel svg { display: block; width: 100%; height: auto; }
.kh-go-panel:not([hidden]) { animation: kh-go-in .5s var(--kh-ease); }
@keyframes kh-go-in { from { opacity: 0; } }

/* The drawings: thin lines on the page colour, the new sound picked out in white. */
.kh-go-panel .g-win { fill: var(--kh-panel); stroke: var(--kh-line-strong); stroke-width: 1; }
.kh-go-panel .g-line { fill: none; stroke: var(--kh-line); stroke-width: 1; }
.kh-go-panel .g-dot { fill: none; stroke: var(--kh-line-strong); stroke-width: 1; }
.kh-go-panel .g-label { font-family: var(--kh-font-mono); font-size: 10px; letter-spacing: .12em; fill: var(--kh-text-faint); }
.kh-go-panel .g-clip { fill: #1C1C1B; stroke: var(--kh-line-strong); stroke-width: 1; }
.kh-go-panel .g-new { stroke: var(--kh-text); }
.kh-go-panel .g-wave { fill: none; stroke: #6F6D68; stroke-width: 1.2; }
.kh-go-panel .g-panel { fill: #181817; stroke: var(--kh-text); stroke-width: 1.2; }
.kh-go-panel .g-brand { font-family: var(--kh-font-mono); font-size: 11px; letter-spacing: .08em; fill: var(--kh-text); }
.kh-go-panel .g-field { fill: var(--kh-bg); stroke: var(--kh-line-strong); stroke-width: 1; }
.kh-go-panel .g-prompt { font-family: var(--kh-font-mono); font-size: 11px; fill: var(--kh-text-soft); }
.kh-go-panel .g-tri { fill: var(--kh-text-soft); }
.kh-go-panel .g-drag { fill: none; stroke: var(--kh-text); stroke-width: 1.2; stroke-dasharray: 3 4; }
.kh-go-panel .g-note { fill: none; stroke: #6F6D68; stroke-width: 4; }

@media (min-width: 768px) {
  .kh-go { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 0 var(--kh-gap); align-items: start; }
  .kh-go-tabs { grid-column: 1 / span 5; }
  .kh-go-stage { grid-column: 7 / span 6; padding: 20px; }
  .kh-go-tab { padding: 22px 0 26px; }
  .kh-go-title { font-size: 19px; }
  .kh-go-text { font-size: 15px; }
}
/* Desktop: the drawing takes five columns, about as tall as the three tabs. */
@media (min-width: 1100px) {
  .kh-go-stage { grid-column: 8 / span 5; }
}
/* Phones: kept short enough to sit on screen with the tab text above it. */
@media (max-width: 767px) {
  .kh-go-stage { max-width: 420px; padding: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .kh-go-tab[aria-selected="true"] .kh-go-bar i { animation: none; transform: scaleX(1); }
  .kh-go-panel:not([hidden]) { animation: none; }
}

/* --- team page ------------------------------------------------------------------------------------- */

.kh-eyebrow { margin-bottom: 16px; }
.kh-team-lead { margin-top: 24px; max-width: 640px; font-size: 17px; line-height: 1.55; color: var(--kh-text-dim); }
.kh-people { display: flex; flex-direction: column; gap: 56px; }
.kh-person { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.kh-person-img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 4px; background: var(--kh-panel); }
.kh-person-text { display: flex; flex-direction: column; gap: 6px; }
.kh-person-note { font-size: 14px; color: var(--kh-text-muted); }
.kh-person-bio { margin-top: 10px; max-width: 560px; font-size: 15px; line-height: 1.5; color: var(--kh-text-dim); }
.kh-team-mail { margin-top: 16px; font-size: 17px; }
.kh-team-mail a { text-decoration: underline; text-underline-offset: 3px; transition: color .15s; }
.kh-team-mail a:hover { color: var(--kh-text-dim); }
@media (min-width: 768px) {
  .kh-people { gap: 72px; }
  .kh-person { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 16px; align-items: center; }
  .kh-person-img { grid-column: 1 / span 4; }
  .kh-person-text { grid-column: 6 / span 6; }
  .kh-team-lead { color: var(--kh-text-muted); }
}

/* --- web synth modal ---------------------------------------------------------------------------------
   Unscoped: staticEntry appends the overlay to <body>, outside .kh. */

.synth-modal-overlay{position:fixed;inset:0;z-index:99999;background:rgba(0,0,0,.82);
  backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);display:flex;align-items:center;
  justify-content:center;padding:20px;opacity:0;pointer-events:none;transition:opacity .2s ease}
.synth-modal-overlay.open{opacity:1;pointer-events:auto}
/* height hugs the synth app's own content (~583px of #synth-container plus
   the 38px header) rather than forcing a tall box the fixed-height synth UI
   never fills; max-height is the safety cap for short or landscape viewports. */
.synth-modal-box{width:1080px;max-width:100%;height:660px;max-height:92vh;
  background:#0a0a0c;border:1px solid rgba(255,255,255,.15);border-radius:12px;
  box-shadow:0 30px 60px rgba(0,0,0,.9),0 0 0 1px rgba(255,255,255,.05);
  display:flex;flex-direction:column;overflow:hidden;transform:scale(.96);transition:transform .2s cubic-bezier(.16,1,.3,1)}
.synth-modal-overlay.open .synth-modal-box{transform:scale(1)}
.synth-modal-header{height:38px;padding:0 12px;background:#141418;border-bottom:1px solid rgba(255,255,255,.08);
  display:flex;align-items:center;justify-content:flex-end;user-select:none;flex-shrink:0}
.synth-modal-close{width:28px;height:28px;padding:0;display:flex;align-items:center;justify-content:center;
  background:transparent;border:none;border-radius:6px;color:#888;cursor:pointer;transition:background .15s,color .15s}
.synth-modal-close:hover{background:rgba(255,255,255,.1);color:#fff}
.synth-modal-close svg{width:16px;height:16px;stroke:currentColor}
.synth-modal-frame{flex:1;width:100%;height:100%;border:none;background:#000}

/* On a phone the synth is the whole page, not a floating card. */
@media (max-width:820px){
  .synth-modal-overlay{padding:0}
  .synth-modal-box{width:100%;height:100%;max-height:100%;border-radius:0;border:none;box-shadow:none}
}

/* --- privacy policy ------------------------------------------------------------------ */

.kh-legal { padding-top: 120px; }
.kh-legal-body { max-width: 720px; font-size: 15px; line-height: 1.6; color: var(--kh-text-dim); }
.kh-legal-body h1 { margin-bottom: 24px; font-size: 32px; line-height: 1.1; font-weight: 500; letter-spacing: -.025em; color: var(--kh-text); }
.kh-legal-body h2 { margin: 48px 0 12px; font-size: 22px; line-height: 1.25; font-weight: 500; letter-spacing: -.015em; color: var(--kh-text); }
.kh-legal-body h3 { margin: 28px 0 8px; font-size: 17px; font-weight: 500; color: var(--kh-text); }
.kh-legal-body p, .kh-legal-body ul, .kh-legal-body ol { margin: 0 0 14px; }
.kh-legal-body ul, .kh-legal-body ol { padding-left: 20px; }
.kh-legal-body ul { list-style: disc; }
.kh-legal-body ol { list-style: decimal; }
.kh-legal-body li { margin-bottom: 6px; }
.kh-legal-body strong { font-weight: 500; color: var(--kh-text); }
.kh-legal-body a { color: var(--kh-text); text-decoration: underline; text-underline-offset: 3px; }
.kh-legal-body code { font-family: var(--kh-font-mono); font-size: 13px; }
.kh-legal-body .table-wrap, .kh-legal-body div:has(> table) { overflow-x: auto; margin: 0 0 20px; }
.kh-legal-body table { width: 100%; border-collapse: collapse; font-size: 14px; }
.kh-legal-body th, .kh-legal-body td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--kh-line); text-align: left; vertical-align: top; }
.kh-legal-body th { font-weight: 500; color: var(--kh-text); }
@media (min-width: 768px) {
  .kh-legal { padding-top: 160px; }
  .kh-legal-body h1 { font-size: 52px; line-height: 1.08; letter-spacing: -.03em; margin-bottom: 32px; }
}

/* --- building with a team ------------------------------------------------------------ */

/* A panel under the signup, a sub-section's gap below it: heading left, line and "Talk to us" right. */
.kh-team-sec { padding-top: var(--kh-sub-top); }
.kh-team { display: grid; gap: 14px; padding: 32px 24px; border-radius: 4px; background: var(--kh-panel-2); }
.kh-team-h { font-size: 22px; line-height: 1.2; font-weight: 500; letter-spacing: -.015em; }
.kh-team-text { max-width: 400px; font-size: 15px; line-height: 1.55; color: var(--kh-text-muted); }
.kh-team-cta { margin-top: 18px; min-height: 26px; }
.kh-team-talk, .kh-team-copy {
  padding: 0 0 3px; font: inherit; font-size: 15px; color: var(--kh-text);
  border-bottom: 1px solid var(--kh-line-strong); transition: border-color .15s;
}
.kh-team-talk:hover, .kh-team-copy:hover { border-color: var(--kh-text); }
.kh-team-email { display: inline-flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.kh-team-email[hidden], .kh-team-talk[hidden] { display: none; }
.kh-team-addr { font-size: 15px; color: var(--kh-text); user-select: all; }
.kh-team-copy { font-size: 13px; color: var(--kh-text-muted); }
@media (min-width: 768px) {
  .kh-team { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; gap: var(--kh-gap); padding: 56px 64px; }
  .kh-team-h { font-size: 24px; }
}
@media (min-width: 1100px) {
  .kh-team { padding: 64px 112px; }
  .kh-team-h { font-size: 28px; }
  .kh-team-text { max-width: 440px; font-size: 16px; }
}

/* Community covers carry the prompt that made them, in the asset cards' mono. */
.kh-cover-prompt {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden;
  font-family: var(--kh-font-mono); font-size: 12px; line-height: 1.5; color: var(--kh-text);
}
.kh-cover .kh-tile-shade { background: linear-gradient(180deg, rgba(10, 10, 10, 0) 35%, rgba(10, 10, 10, .85) 100%); }
@media (min-width: 768px) {
  .kh-cover-prompt { font-size: 13px; }
}
.kh-cover-made { margin-bottom: 4px; font-size: 12px; font-style: italic; color: var(--kh-text-soft); }
.kh-covers { margin-top: 24px; }
@media (min-width: 768px) {
  .kh-cover-made { font-size: 13px; }
}

/* The label and prompt show on hover, focus or while playing; touch screens, which cannot hover, always show them. */
@media (hover: hover) {
  .kh-cover .kh-tile-text, .kh-cover .kh-tile-shade { opacity: 0; transition: opacity .2s; }
  .kh-cover:hover .kh-tile-text, .kh-cover:hover .kh-tile-shade,
  .kh-cover:focus-visible .kh-tile-text, .kh-cover:focus-visible .kh-tile-shade,
  .kh-cover[aria-pressed="true"] .kh-tile-text, .kh-cover[aria-pressed="true"] .kh-tile-shade { opacity: 1; }
}

/* Phones: one sideways strip, the three link cards then the five covers, each cover as tall as a card photo. */
@media (max-width: 767px) {
  .kh-mosaic { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; margin: 28px calc(var(--kh-gutter) * -1) 0 0; padding-right: var(--kh-gutter); scroll-snap-type: x mandatory; }
  .kh-mosaic::-webkit-scrollbar { display: none; }
  .kh-tiles, .kh-covers { display: contents; }
  .kh-mosaic li { scroll-snap-align: start; }
  .kh-covers > li { flex: 0 0 170px; }
  .kh-a-c5 { display: block; }
  .kh-cover { width: 170px; height: 170px; }
}

/* Wavetable cards sweep the frames instead: the frame at the play position
   shows bright (.kh-vis-cur, set by homeV2.ts), with no clip and no line. */
.kh-vis-wt.is-live .kh-vis-head, .kh-vis-wt.is-live .kh-vis-lit { display: none; }
.kh-vis-cur { display: none; fill: none; stroke: #fff; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.kh-vis-wt.is-live .kh-vis-cur { display: inline; }

@media (min-width: 1100px) { .kh-mark { width: 480px; height: 480px; } }
