/* ============================================================================
   models-catalog.css - /models, the native model catalogue
   ----------------------------------------------------------------------------
   Loaded after eugeny.css, common-home.css and inner-pages.css. Reuses the
   Common Ground tokens: ivory paper, ink blue, pale blue band, one orange
   accent, Fraunces display against system UI. Flat surfaces, hairline rules,
   no gradients. Each model is one entry: name, facts, one line, a live sample.
   ========================================================================== */

.mc-head {
  padding: clamp(40px, 5vw, 76px) 0 clamp(26px, 3vw, 40px);
  border-bottom: 2px solid var(--ch-ink);
}
.mc-head h1 {
  font-family: var(--ch-display);
  font-size: clamp(2.4rem, 5vw, 4.3rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.018em;
  color: var(--ch-ink);
  max-width: 15ch;
}
.mc-head .ip-lede { max-width: 44ch; }

.mc-install {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: clamp(20px, 2.4vw, 28px);
  font-size: .86rem;
  color: var(--ch-body);
}
.mc-install > span {
  font-weight: 600;
  color: var(--ch-ink);
}
.mc-install code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: .82rem;
  padding: 5px 10px;
  background: var(--ch-ivory-2);
  border: 1px solid var(--ch-line);
  border-radius: 6px;
  color: var(--ch-ink);
  overflow-wrap: anywhere;
}
.mc-install .ch-ic { width: 1.3em; height: 1em; color: var(--ch-orange); }
.mc-to { display: inline-flex; align-items: center; gap: 12px; min-width: 0; }

.mc-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: clamp(18px, 2vw, 24px);
}
.mc-jump a {
  font-size: .9rem;
  font-weight: 600;
  color: var(--ch-ink-2);
  text-decoration: none;
  padding-bottom: 3px;
  border-bottom: 1px solid var(--ch-line-2);
  transition: border-color .2s var(--ch-ease-soft), color .2s var(--ch-ease-soft);
}
.mc-jump a:hover { color: var(--ch-ink); border-bottom-color: var(--ch-orange); }


/* Sections ---------------------------------------------------------------- */
.mc-sec { padding: 56px 32px; scroll-margin-top: 12px; }
.mc-sec > .ch-wrap { width: min(var(--ch-wrap), 100%); }
.mc-sec--band { background: var(--ch-band); }
.mc-sec-title {
  font-family: var(--ch-display);
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -.014em;
  color: var(--ch-ink);
  max-width: 22ch;
  padding-bottom: clamp(14px, 1.8vw, 20px);
  border-bottom: 1px solid var(--ch-line-2);
}
.mc-sec--band .mc-sec-title { color: var(--ch-band-ink); border-bottom-color: rgba(27, 47, 92, .3); }


/* Shared entry parts ------------------------------------------------------ */
.mc-flag h3,
.mc-card h3 {
  font-family: var(--ch-display);
  font-weight: 600;
  letter-spacing: -.012em;
  line-height: 1.08;
  color: var(--ch-ink);
}
.mc-flag h3 { font-size: clamp(1.7rem, 2.8vw, 2.5rem); }
.mc-card h3 { font-size: clamp(1.25rem, 1.8vw, 1.5rem); }

.mc-facts {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.mc-facts li {
  padding: 4px 10px;
  border: 1px solid var(--ch-line-2);
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
  color: var(--ch-ink);
  background: var(--ch-ivory-2);
  white-space: nowrap;
}

.mc-pitch {
  margin-top: 12px;
  max-width: 44ch;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ch-body);
}

.mc-tags {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
}
.mc-tags li {
  position: relative;
  padding-left: 12px;
  font-size: .82rem;
  font-weight: 500;
  color: var(--ch-label);
}
.mc-tags li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .55em;
  width: 5px;
  height: 5px;
  background: var(--ch-orange);
}

.mc-info > p:last-child:has(.ch-link) { margin-top: 16px; }


/* Flagships: info left, live stage right ---------------------------------- */
.mc-flag {
  display: grid;
  grid-template-columns: minmax(0, .42fr) minmax(0, .58fr);
  gap: clamp(22px, 4vw, 60px);
  align-items: start;
  padding: clamp(28px, 3.4vw, 46px) 0;
  border-bottom: 1px solid var(--ch-line);
  scroll-margin-top: 12px;
}
.mc-flag:last-child { border-bottom: 0; padding-bottom: 0; }


/* Stage: the live sample surface ------------------------------------------ */
.mc-stage {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.mc-flag .mc-stage {
  padding: 0;
}
.mc-card .mc-stage { margin-top: auto; padding-top: 16px; }

/* Segmented control */
.mc-seg {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.mc-seg button {
  appearance: none;
  min-height: 36px;
  padding: 7px 14px;
  border: 1px solid var(--ch-line-2);
  border-radius: 999px;
  background: var(--ch-ivory-2);
  color: var(--ch-ink-2);
  font-size: .84rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .2s var(--ch-ease-soft), color .2s var(--ch-ease-soft), border-color .2s var(--ch-ease-soft);
}
.mc-seg button:hover { border-color: var(--ch-ink); color: var(--ch-ink); }
.mc-seg button[aria-selected="true"],
.mc-seg button[aria-pressed="true"] {
  background: var(--ch-ink);
  border-color: var(--ch-ink);
  color: var(--ch-ivory-2);
}

/* Text panels */
.mc-panel { display: grid; gap: 12px; min-height: 148px; align-content: start; }
.mc-panel[hidden] { display: none; }
.mc-ask {
  display: flex;
  gap: 10px;
  align-items: baseline;
  padding: 12px 14px;
  border: 1px solid var(--ch-line);
  border-radius: 10px;
  background: #fff;
  font-size: .94rem;
  line-height: 1.45;
  color: var(--ch-slate);
  max-width: none;
}
.mc-ask span {
  flex: none;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ch-label);
}
.mc-ask--img { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 14px; align-items: center; }
.mc-ask--img img { width: 112px; height: auto; aspect-ratio: 832 / 480; object-fit: cover; border-radius: 6px; }
.mc-ask--img p { display: flex; gap: 10px; align-items: baseline; max-width: none; }
.mc-ask--img p span { flex: none; font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ch-label); }
.mc-reply {
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--ch-side);
  font-size: .94rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--ch-ink);
  max-width: none;
}
.mc-cue { font-style: normal; font-size: .82rem; font-weight: 650; color: #b93c16; margin-right: 3px; }
.mc-out {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--ch-line);
  border: 1px solid var(--ch-line);
  border-radius: 10px;
  overflow: hidden;
}
.mc-out > div { padding: 12px 14px; background: var(--ch-ivory-2); min-width: 0; }
.mc-out dt {
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ch-label);
}
.mc-out dd {
  margin: 4px 0 0;
  font-family: var(--ch-display);
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--ch-ink);
}
.mc-out dd.mc-fast { color: #b93c16; font-variant-numeric: tabular-nums; }
.mc-out dd.mc-vs { color: var(--ch-label); font-variant-numeric: tabular-nums; }
.mc-out--big dd {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.mc-choices {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.mc-choices li {
  padding: 6px 12px;
  border: 1px dashed var(--ch-line-2);
  border-radius: 8px;
  font-size: .86rem;
  color: var(--ch-label);
}
.mc-choices li.is-picked {
  border: 1px solid var(--ch-ink);
  background: var(--ch-ink);
  color: var(--ch-ivory-2);
  font-weight: 600;
}
.mc-note { font-size: .86rem; color: var(--ch-label); max-width: none; }

/* Media frames */
.mc-media {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: 10px;
  background: var(--ch-frame);
}
.mc-media img,
.mc-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.mc-media--square { aspect-ratio: 1 / 1; }
.mc-media--wide { aspect-ratio: 832 / 480; background: var(--ch-slate); }
.mc-flag .mc-media--square { max-width: 440px; }
.mc-media--photo { aspect-ratio: 4 / 3; }
.mc-media--photo img { object-position: 50% 55%; }
.mc-media img { transition: opacity .18s var(--ch-ease-soft); }
.mc-media img.is-swapping { opacity: .35; }

.mc-badge {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--ch-ivory-2);
  color: var(--ch-ink);
  font-size: .78rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.mc-unmute {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 14px;
  border: 0;
  border-radius: 999px;
  background: var(--ch-ivory-2);
  color: var(--ch-ink);
  font-size: .84rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 16px -8px rgba(20, 40, 80, .5);
  transition: background-color .2s var(--ch-ease-soft), color .2s var(--ch-ease-soft);
}
.mc-unmute .ch-ic { width: 18px; height: 18px; }
.mc-unmute:hover { background: #fff; }
.mc-unmute[aria-pressed="true"] { background: var(--ch-ink); color: var(--ch-ivory-2); }

/* Qwen transparency surfaces */
.mc-alpha { transition: background-color .25s var(--ch-ease-soft); }
.mc-alpha[data-surface-target="paper"] { background: var(--ch-ivory); }
.mc-alpha[data-surface-target="ink"] { background: var(--ch-ink); }
.mc-alpha img { object-fit: contain; }

/* Audio player */
.mc-player {
  display: flex;
  align-items: center;
  gap: 14px;
}
.mc-play {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 16px 8px 12px;
  border: 0;
  border-radius: 999px;
  background: #b93c16;
  color: #fff;
  font-size: .88rem;
  font-weight: 700;
  cursor: pointer;
  flex: none;
  transition: background-color .2s var(--ch-ease-soft);
}
.mc-play:hover { background: #9c3211; }
.mc-play .ch-ic { width: 18px; height: 18px; fill: currentColor; }
.mc-play[aria-pressed="true"] .ch-ic { fill: none; stroke-width: 2.4; }
.mc-play[aria-busy="true"] { opacity: .7; cursor: progress; }
.mc-track {
  position: relative;
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: rgba(27, 47, 92, .3);
  overflow: hidden;
}
.mc-track i {
  position: absolute;
  inset: 0;
  background: var(--ch-ink);
  transform: scaleX(var(--p, 0));
  transform-origin: left center;
}
.mc-clock {
  flex: none;
  min-width: 3.4em;
  text-align: right;
  font-size: .82rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ch-label);
}
.mc-error { font-size: .84rem; color: #8a3220; max-width: none; }

/* Dialogue turns */
.mc-turns {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.mc-turns[hidden] { display: none; }
.mc-turns li {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
  padding: 12px 14px;
  border: 1px solid var(--ch-line);
  border-radius: 10px;
  background: #fff;
  transition: background-color .2s var(--ch-ease-soft), border-color .2s var(--ch-ease-soft), color .2s var(--ch-ease-soft);
}
.mc-who {
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ch-label);
}
.mc-line {
  font-family: var(--ch-display);
  font-size: 1.1rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--ch-ink);
}
.mc-turns li.is-live { background: var(--ch-ink); border-color: var(--ch-ink); }
.mc-turns li.is-live .mc-who { color: #f18a62; }
.mc-turns li.is-live .mc-cue { color: #f18a62; }
.mc-turns li.is-live .mc-line { color: var(--ch-ivory-2); }

/* Word highlight */
.mc-words {
  padding: 14px 16px;
  border: 1px solid var(--ch-line);
  border-radius: 10px;
  background: #fff;
  font-family: var(--ch-display);
  font-size: 1.2rem;
  line-height: 1.6;
  color: var(--ch-label);
  max-width: none;
}
.mc-words span {
  padding: 2px 5px;
  margin: 0 -3px;
  border-radius: 4px;
  transition: background-color .12s linear, color .12s linear;
}
.mc-words span.is-said { color: var(--ch-ink); }
.mc-words span.is-live { background: var(--ch-ink); color: var(--ch-ivory-2); }


/* Specialist grid ---------------------------------------------------------- */
.mc-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(14px, 1.8vw, 22px);
  margin-top: clamp(22px, 2.6vw, 32px);
}
.mc-card {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: clamp(18px, 2vw, 24px);
  background: var(--ch-card);
  border: 1px solid rgba(27, 47, 92, .14);
  border-radius: 14px;
  scroll-margin-top: 12px;
}
.mc-card--wide { grid-column: span 3; }
.mc-card--pair { grid-column: span 6; }
.mc-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 3vw, 44px);
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--ch-line);
}
.mc-pair > div { min-width: 0; }
.mc-sub {
  font-size: .92rem;
  font-weight: 700;
  color: var(--ch-ink);
}
.mc-grid--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mc-grid--three .mc-card { grid-column: span 1; }
.mc-grid--three .mc-card h3 { min-height: 2.16em; }
.mc-grid--three .mc-card .mc-facts { min-height: 4.2em; align-content: flex-start; }
.mc-grid--three .mc-card .mc-pitch { min-height: 4.65em; }


/* Focus and selection on controls ----------------------------------------- */
.mc-seg button:focus-visible,
.mc-play:focus-visible,
.mc-unmute:focus-visible { outline: 2px solid var(--ch-ink); outline-offset: 3px; }
.mc-turns ::selection,
.mc-words ::selection { background: var(--ch-ink); color: var(--ch-ivory); }


/* Motion: one quiet entrance per entry ------------------------------------ */
@media (prefers-reduced-motion: no-preference) {
  .mc-head > * { animation: ip-rise .75s var(--ch-ease) both; }
  .mc-head .ip-lede { animation-delay: .08s; }
  .mc-head .mc-install { animation-delay: .14s; }
  .mc-head .mc-jump { animation-delay: .2s; }
}
@media (prefers-reduced-motion: reduce) {
  .mc-head > * { animation: none !important; }
}


/* The ink skip link keeps ivory text on hover. */
.ch-skip:hover { color: var(--ch-ivory-2); }


/* Responsive --------------------------------------------------------------- */
@media (max-width: 1020px) {
  .mc-sec { padding-block: 44px; }
  .mc-flag { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .mc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mc-card,
  .mc-card--wide { grid-column: span 1; }
  .mc-card--pair { grid-column: span 2; }
  .mc-grid--three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mc-grid--three .mc-card:last-child { grid-column: span 2; }
  .mc-grid--three .mc-card:last-child .mc-media--square { max-width: 440px; }
}

@media (max-width: 640px) {
  .mc-sec { padding: 36px 24px; }
  .mc-flag .mc-stage { padding: 0; }
  .mc-grid,
  .mc-grid--three { grid-template-columns: minmax(0, 1fr); }
  .mc-card,
  .mc-card--wide,
  .mc-card--pair,
  .mc-grid--three .mc-card:last-child { grid-column: span 1; }
  .mc-pair { grid-template-columns: minmax(0, 1fr); }
  .mc-out { grid-template-columns: minmax(0, 1fr); }
  .mc-turns li { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .mc-ask { flex-direction: column; gap: 4px; }
  .mc-panel { min-height: 0; }
  .mc-ask--img { grid-template-columns: minmax(0, 1fr); }
  .mc-ask--img img { width: 100%; height: auto; }
  .mc-ask--img p { flex-direction: column; gap: 4px; }
  .mc-grid--three .mc-card .mc-pitch,
  .mc-grid--three .mc-card h3,
  .mc-grid--three .mc-card .mc-facts { min-height: 0; }
}
