/* Meykt Community — Parameter library surface */

.cm-main {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.5rem 0 3rem;
}

.cm-stack {
  display: grid;
  gap: 1.25rem;
}

.cm-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--meykt-green, #2d4a3e);
}

.cm-hero {
  display: grid;
  gap: 0.75rem;
  padding: 1.5rem 0 0.5rem;
}

.cm-hero-compact {
  padding-top: 0.5rem;
}

.cm-hero h1 {
  margin: 0;
  font-size: clamp(1.75rem, 4vw, 2.4rem);
  line-height: 1.15;
  color: var(--ink, #1a1d1a);
}

.cm-lead {
  margin: 0;
  max-width: 42rem;
  color: var(--muted, #5c635c);
  font-size: 1.05rem;
  line-height: 1.55;
}

.cm-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.cm-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cm-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--line, #e0ddd4);
  background: var(--panel, #faf7f2);
  color: var(--ink, #1a1d1a);
  font-size: 0.9rem;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.cm-chip:hover,
.cm-chip:focus-visible {
  border-color: var(--meykt-green, #2d4a3e);
  background: #eff3f0;
  outline: none;
}

.cm-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: #eff3f0;
  color: var(--meykt-green, #2d4a3e);
  font-size: 0.75rem;
  font-weight: 600;
}

.cm-section-title {
  margin: 1.5rem 0 0.75rem;
  font-size: 1.25rem;
}

.cm-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 1rem;
}

.cm-card {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 1.1rem 1.15rem;
  border: 1px solid var(--line, #e0ddd4);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(26, 29, 26, 0.04);
  min-width: 0;
}

.cm-card h2,
.cm-card h3 {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.3;
}

.cm-card p {
  margin: 0;
  color: var(--muted, #5c635c);
  font-size: 0.95rem;
  line-height: 1.45;
}

.cm-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.75rem;
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted, #5c635c);
}

.cm-card-meta span {
  min-width: 0;
}

.cm-card-link {
  margin-top: auto;
  align-self: flex-start;
  font-weight: 600;
  color: var(--meykt-green, #2d4a3e);
  text-decoration: none;
}

.cm-card-link:hover,
.cm-card-link:focus-visible {
  text-decoration: underline;
  outline: none;
}

.cm-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: 0.75rem;
  padding: 1rem;
  border: 1px solid var(--line, #e0ddd4);
  border-radius: 14px;
  background: var(--panel, #faf7f2);
  align-items: end;
}

.cm-field {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
}

.cm-field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink, #1a1d1a);
}

.cm-field input,
.cm-field select {
  width: 100%;
  min-height: 40px;
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--line, #e0ddd4);
  border-radius: 10px;
  background: #fff;
  font: inherit;
}

.cm-filters button {
  min-height: 40px;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 10px;
  background: var(--meykt-green, #2d4a3e);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.cm-filters button:hover,
.cm-filters button:focus-visible {
  background: #243d33;
  outline: none;
}

.cm-meta {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted, #5c635c);
}

.cm-empty {
  margin: 0;
  padding: 1.5rem;
  text-align: center;
  color: var(--muted, #5c635c);
  border: 1px dashed var(--line, #e0ddd4);
  border-radius: 14px;
}

.cm-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: var(--muted, #5c635c);
}

.cm-breadcrumb a {
  color: var(--meykt-green, #2d4a3e);
  text-decoration: none;
}

.cm-breadcrumb a:hover,
.cm-breadcrumb a:focus-visible {
  text-decoration: underline;
  outline: none;
}

.cm-back {
  display: inline-flex;
  margin-bottom: 0.25rem;
  color: var(--meykt-green, #2d4a3e);
  text-decoration: none;
  font-size: 0.95rem;
}

.cm-back:hover,
.cm-back:focus-visible {
  text-decoration: underline;
  outline: none;
}

.cm-two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

@media (max-width: 800px) {
  .cm-two-col {
    grid-template-columns: 1fr;
  }
}

.cm-panel {
  padding: 1.15rem 1.2rem;
  border: 1px solid var(--line, #e0ddd4);
  border-radius: 14px;
  background: #fff;
}

.cm-panel h2 {
  margin: 0 0 0.75rem;
  font-size: 1.15rem;
}

.cm-table-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}

.cm-param-table {
  width: 100%;
  min-width: 18rem;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.cm-param-table th,
.cm-param-table td {
  padding: 0.55rem 0.4rem;
  border-bottom: 1px solid var(--line, #e0ddd4);
  text-align: left;
  vertical-align: top;
}

.cm-param-table th {
  font-weight: 600;
  width: 40%;
}

.cm-value {
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.cm-meta-list {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.95rem;
}

.cm-meta-list li {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: 0.5rem;
}

.cm-meta-list strong {
  color: var(--muted, #5c635c);
  font-weight: 600;
}

.cm-list {
  margin: 0;
  padding-left: 1.2rem;
}

.cm-list li {
  margin: 0.35rem 0;
  line-height: 1.45;
}

.cm-callout {
  margin: 0;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  border: 1px solid #e8c9a8;
  background: #fff7ef;
  color: #5a3a22;
  line-height: 1.45;
}

.cm-note {
  margin: 0.75rem 0 0;
  color: var(--muted, #5c635c);
  line-height: 1.45;
}

.cm-cta,
.cm-cta-box {
  display: grid;
  gap: 0.65rem;
  padding: 1.25rem 1.3rem;
  border-radius: 14px;
  background: linear-gradient(160deg, #2d4a3e 0%, #243d33 100%);
  color: #f4f1ea;
}

.cm-cta h2,
.cm-cta-box h2 {
  margin: 0;
  font-size: 1.2rem;
  color: #fff;
}

.cm-cta p,
.cm-cta-box p {
  margin: 0;
  color: rgba(244, 241, 234, 0.9);
  line-height: 1.5;
}

.cm-cta .btn,
.cm-cta-box .btn,
.cm-cta .cm-btn-primary,
.cm-cta-box .cm-btn-primary {
  justify-self: start;
}

.cm-steps {
  margin: 0;
  padding-left: 1.25rem;
}

.cm-steps li {
  margin: 0.55rem 0;
  line-height: 1.45;
}

.cm-signup-note {
  margin: 0.75rem 0 0;
  font-size: 0.9rem;
  color: var(--muted, #5c635c);
}

/* Button aliases (pages use cm-btn-* alongside shared .btn) */
.cm-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0.55rem 1.1rem;
  border-radius: 10px;
  border: none;
  background: var(--meykt-green, #2d4a3e);
  color: #fff !important;
  font-weight: 600;
  text-decoration: none;
}

.cm-btn-primary:hover,
.cm-btn-primary:focus-visible {
  background: #243d33;
  outline: none;
}

.cm-btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0.55rem 1.1rem;
  border-radius: 10px;
  border: 1px solid var(--line, #e0ddd4);
  background: transparent;
  color: var(--ink, #1a1d1a);
  font-weight: 600;
  text-decoration: none;
}

.cm-btn-ghost:hover,
.cm-btn-ghost:focus-visible {
  border-color: var(--meykt-green, #2d4a3e);
  background: #eff3f0;
  outline: none;
}

.cm-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg, #f4f1ea);
  color: var(--ink, #1a1d1a);
}

.cm-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(45, 74, 62, 0.12);
  background: rgba(244, 241, 234, 0.88);
  backdrop-filter: blur(12px);
}

.cm-header-inner {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 0.85rem 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

.cm-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.cm-brand-mark {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
}

.cm-brand-text {
  font-weight: 700;
  font-size: 1.05rem;
}

.cm-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
}

.cm-nav a {
  color: var(--ink, #1a1d1a);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}

.cm-nav a:hover,
.cm-nav a:focus-visible {
  color: var(--meykt-green, #2d4a3e);
  outline: none;
}

.cm-lang {
  display: inline-flex;
  gap: 0.25rem;
  margin-left: 0.25rem;
}

.cm-lang a,
.cm-lang-btn {
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-family: inherit;
}

.cm-lang a[aria-current='page'],
.cm-lang-btn.is-active {
  background: var(--meykt-green, #2d4a3e);
  color: #fff;
}

.cm-lang-btn:hover,
.cm-lang-btn:focus-visible {
  outline: 2px solid var(--meykt-green, #2d4a3e);
  outline-offset: 2px;
}

.cm-footer {
  margin-top: auto;
  border-top: 1px solid var(--line, #e0ddd4);
  background: #ebe5d8;
}

.cm-footer-inner {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.5rem 0 2rem;
  display: grid;
  gap: 1rem;
}

.cm-footer-title {
  margin: 0;
  font-weight: 700;
}

.cm-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.1rem;
}

.cm-footer-links a {
  color: var(--meykt-green, #2d4a3e);
  text-decoration: none;
  font-size: 0.9rem;
}

.cm-footer-links a:hover,
.cm-footer-links a:focus-visible {
  text-decoration: underline;
  outline: none;
}

.cm-footer-legal {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted, #5c635c);
}

@media (max-width: 560px) {
  .cm-meta-list li {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }

  .cm-filters {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   Community 2.0 — guided catalogue
   ============================================================ */

:root {
  --cm-violet: hsl(246 69% 47%);
  --cm-violet-soft: hsl(246 69% 96%);
  --cm-ink: #16151b;
  --cm-muted: #6d6962;
  --cm-line: #e5e1da;
  --cm-surface: #fff;
  --cm-canvas: #faf9f7;
  --cm-sand: #f3efe9;
  --cm-success: #1f7a54;
  --cm-warning: #a75c13;
}

.cm-main {
  width: min(1240px, calc(100% - 2rem));
  padding-top: 2rem;
}

.cm-community-page {
  display: grid;
  gap: clamp(2.5rem, 6vw, 5.5rem);
}

.cm-section-heading {
  display: grid;
  gap: 0.5rem;
  max-width: 48rem;
}

.cm-section-heading h2 {
  font-size: clamp(1.8rem, 3vw, 2.65rem);
}

.cm-page-header {
  display: grid;
  gap: 0.7rem;
  max-width: 52rem;
  padding: clamp(1.5rem, 4vw, 3rem) 0 1rem;
}

.cm-page-header h1 {
  font-size: clamp(2.5rem, 6vw, 4.8rem);
}

.cm-section {
  display: grid;
  gap: 0.9rem;
}

.cm-cta-panel {
  display: grid;
  gap: 0.8rem;
  padding: clamp(1.4rem, 4vw, 2.5rem);
  border-radius: 22px;
  background:
    radial-gradient(circle at 90% 0%, rgba(166, 139, 255, 0.35), transparent 34%),
    var(--cm-ink);
  color: #fff;
}

.cm-cta-panel h2 {
  color: #fff;
}

.cm-cta-panel p {
  color: rgba(255, 255, 255, 0.72);
}

.cm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.cm-cta-panel .cm-btn-ghost {
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}

.cm-area-section,
.cm-featured-section {
  display: grid;
  gap: 1.35rem;
}

/* Header */
.cm-header {
  background: rgba(250, 249, 247, 0.88);
  border-color: rgba(22, 21, 27, 0.08);
}

.cm-header-inner {
  width: min(1240px, calc(100% - 2rem));
  min-height: 68px;
  padding: 0.6rem 0;
  flex-wrap: nowrap;
}

.cm-brand-mark {
  width: 38px;
  height: 38px;
}

.cm-brand-text {
  color: var(--cm-ink);
  letter-spacing: -0.025em;
}

.cm-nav-desktop {
  flex-wrap: nowrap;
  gap: 0.25rem;
}

.cm-nav-desktop > a,
.cm-nav-dropdown > summary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 40px;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  list-style: none;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.cm-nav-desktop > a svg,
.cm-nav-dropdown > summary svg {
  width: 15px;
  height: 15px;
}

.cm-nav-desktop > a:hover,
.cm-nav-desktop > a:focus-visible,
.cm-nav-dropdown > summary:hover,
.cm-nav-dropdown > summary:focus-visible {
  background: rgba(22, 21, 27, 0.05);
  color: var(--cm-violet);
  outline: none;
}

.cm-nav-app {
  background: var(--cm-ink);
  color: #fff !important;
  padding-inline: 1rem !important;
}

.cm-nav-app:hover,
.cm-nav-app:focus-visible {
  background: var(--cm-violet) !important;
  color: #fff !important;
}

.cm-nav-dropdown {
  position: relative;
}

.cm-nav-dropdown > summary::-webkit-details-marker,
.cm-mobile-nav > summary::-webkit-details-marker,
.cm-filter-panel > summary::-webkit-details-marker {
  display: none;
}

.cm-nav-dropdown[open] > summary svg {
  transform: rotate(180deg);
}

.cm-nav-dropdown-panel {
  position: absolute;
  top: calc(100% + 0.6rem);
  right: 0;
  width: min(34rem, calc(100vw - 2rem));
  padding: 0.65rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.3rem;
  border: 1px solid var(--cm-line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 60px -24px rgba(22, 21, 27, 0.28);
}

.cm-nav-dropdown-panel a {
  display: grid;
  gap: 0.15rem;
  padding: 0.75rem;
  border-radius: 12px;
}

.cm-nav-dropdown-panel a:hover,
.cm-nav-dropdown-panel a:focus-visible {
  background: var(--cm-violet-soft);
  outline: none;
}

.cm-nav-dropdown-panel strong {
  font-size: 0.9rem;
}

.cm-nav-dropdown-panel span {
  color: var(--cm-muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.cm-mobile-nav {
  display: none;
  position: relative;
}

.cm-mobile-nav > summary {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--cm-line);
  border-radius: 12px;
  background: var(--cm-surface);
  list-style: none;
  cursor: pointer;
}

.cm-mobile-nav > summary svg {
  width: 20px;
  height: 20px;
}

.cm-mobile-nav-panel {
  position: absolute;
  top: calc(100% + 0.65rem);
  right: 0;
  width: min(20rem, calc(100vw - 1.5rem));
  display: grid;
  padding: 0.7rem;
  border: 1px solid var(--cm-line);
  border-radius: 18px;
  background: var(--cm-surface);
  box-shadow: 0 24px 60px -24px rgba(22, 21, 27, 0.3);
}

.cm-mobile-nav-panel > a {
  padding: 0.72rem 0.65rem;
  border-radius: 10px;
}

.cm-mobile-nav-panel > a:hover,
.cm-mobile-nav-panel > a:focus-visible {
  background: var(--cm-violet-soft);
  color: var(--cm-violet);
  outline: none;
}

.cm-mobile-nav-panel .cm-lang {
  margin: 0.7rem 0 0;
  padding-top: 0.7rem;
  border-top: 1px solid var(--cm-line);
}

/* Hero surfaces */
.cm-home-hero,
.cm-library-hero {
  min-height: 32rem;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 5rem);
  padding: clamp(2rem, 5vw, 4.5rem);
  overflow: hidden;
  border: 1px solid rgba(94, 78, 219, 0.12);
  border-radius: 30px;
  background:
    radial-gradient(circle at 86% 14%, rgba(122, 90, 248, 0.16), transparent 36%),
    radial-gradient(circle at 10% 100%, rgba(234, 159, 109, 0.15), transparent 34%),
    linear-gradient(145deg, #fff 0%, #f8f5ef 62%, #f1edf9 100%);
}

.cm-home-hero-copy,
.cm-library-hero-copy {
  display: grid;
  gap: 1.1rem;
  position: relative;
  z-index: 2;
}

.cm-home-hero h1,
.cm-library-hero h1 {
  max-width: 13ch;
  font-size: clamp(2.65rem, 5.8vw, 5.1rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.cm-home-hero .cm-lead,
.cm-library-hero .cm-lead {
  max-width: 42rem;
  font-size: clamp(1.02rem, 1.6vw, 1.22rem);
}

.cm-hero-search {
  width: min(100%, 44rem);
  min-height: 58px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
  padding: 0.35rem 0.4rem 0.35rem 1rem;
  border: 1px solid rgba(22, 21, 27, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 45px -28px rgba(22, 21, 27, 0.35);
}

.cm-hero-search > svg {
  width: 19px;
  height: 19px;
  color: var(--cm-violet);
}

.cm-hero-search input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--cm-ink);
  font: inherit;
}

.cm-hero-search button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  border: 0;
  border-radius: 999px;
  background: var(--cm-violet);
  color: #fff;
  font-weight: 650;
}

.cm-hero-search button:hover,
.cm-hero-search button:focus-visible {
  background: hsl(246 69% 40%);
  outline: 3px solid rgba(94, 78, 219, 0.18);
}

.cm-home-hero-stage,
.cm-library-hero-art {
  min-height: 25rem;
  position: relative;
  isolation: isolate;
}

.cm-stage-grid {
  position: absolute;
  inset: 10% 4%;
  border-radius: 24px;
  opacity: 0.38;
  background-image:
    linear-gradient(rgba(94, 78, 219, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(94, 78, 219, 0.14) 1px, transparent 1px);
  background-size: 28px 28px;
  transform: perspective(550px) rotateX(58deg) rotateZ(-8deg);
}

.cm-stage-beam,
.cm-hero-beam {
  position: absolute;
  width: 3px;
  height: 48%;
  left: 53%;
  top: 4%;
  border-radius: 999px;
  background: linear-gradient(to bottom, transparent, #ff7d67 50%, #fff 94%);
  filter: drop-shadow(0 0 10px rgba(255, 102, 79, 0.8));
  transform: rotate(7deg);
  transform-origin: bottom;
}

.cm-stage-beam::after,
.cm-hero-beam::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 26px 12px rgba(255, 102, 79, 0.7);
  transform: translateX(-50%);
}

.cm-stage-card {
  position: absolute;
  display: grid;
  gap: 0.5rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(18px);
  box-shadow: 0 24px 60px -30px rgba(22, 21, 27, 0.42);
}

.cm-stage-card small {
  color: var(--cm-muted);
}

.cm-stage-card strong {
  font-size: 1.6rem;
}

.cm-stage-card strong span {
  color: var(--cm-muted);
  font-size: 0.75rem;
}

.cm-stage-card-main {
  width: 62%;
  left: 3%;
  bottom: 20%;
}

.cm-stage-card-main > div {
  height: 7px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(94, 78, 219, 0.1);
}

.cm-stage-card-main > div > span {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cm-violet), #a88cff);
}

.cm-stage-card-side {
  right: 1%;
  top: 19%;
}

.cm-stage-card-bottom {
  right: 7%;
  bottom: 2%;
}

.cm-stage-spark,
.cm-hero-spark {
  position: absolute;
  color: #ff806c;
  filter: drop-shadow(0 0 9px rgba(255, 102, 79, 0.45));
}

.cm-stage-spark svg,
.cm-hero-spark svg {
  width: 24px;
  height: 24px;
}

.cm-stage-spark-one {
  top: 21%;
  left: 29%;
}

.cm-stage-spark-two {
  right: 18%;
  bottom: 29%;
}

.cm-library-hero-art {
  border-radius: 26px;
  background:
    radial-gradient(circle at 50% 45%, rgba(255, 122, 96, 0.18), transparent 27%),
    linear-gradient(145deg, rgba(94, 78, 219, 0.12), rgba(255, 255, 255, 0.5));
}

.cm-hero-orbit {
  position: absolute;
  inset: 13%;
  border: 1px solid rgba(94, 78, 219, 0.22);
  border-radius: 50%;
  transform: rotate(-17deg);
}

.cm-hero-orbit-two {
  inset: 24% 8%;
  transform: rotate(31deg);
}

.cm-hero-beam {
  left: 54%;
  height: 58%;
}

.cm-hero-material {
  position: absolute;
  left: 15%;
  bottom: 10%;
  min-width: 11rem;
  display: grid;
  gap: 0.2rem;
  padding: 1.1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 24px 60px -30px rgba(22, 21, 27, 0.42);
  backdrop-filter: blur(18px);
}

.cm-hero-material span,
.cm-hero-material small {
  color: var(--cm-muted);
}

.cm-hero-material strong {
  font-size: 2.1rem;
  line-height: 1;
}

.cm-home-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--cm-line);
  border-radius: 18px;
  background: var(--cm-line);
}

.cm-home-stats > div {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 1.2rem 1.35rem;
  background: var(--cm-surface);
}

.cm-home-stats strong {
  color: var(--cm-violet);
  font-size: 1.75rem;
}

.cm-home-stats span {
  color: var(--cm-muted);
  font-size: 0.9rem;
}

/* Domain navigation */
.cm-domain-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.cm-domain-card {
  min-width: 0;
  min-height: 148px;
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  padding: 1.1rem;
  border: 1px solid var(--cm-line);
  border-radius: 18px;
  background: var(--cm-surface);
  box-shadow: 0 1px 2px rgba(22, 21, 27, 0.03);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.cm-domain-card:hover,
.cm-domain-card:focus-visible {
  border-color: rgba(94, 78, 219, 0.38);
  box-shadow: 0 20px 45px -28px rgba(22, 21, 27, 0.38);
  transform: translateY(-3px);
  outline: none;
}

.cm-domain-icon,
.cm-icon-tile {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--cm-violet-soft);
  color: var(--cm-violet);
}

.cm-domain-icon svg,
.cm-icon-tile svg {
  width: 21px;
  height: 21px;
}

.cm-domain-card[data-accent="coral"] .cm-domain-icon { background: #fff0e9; color: #bf5d34; }
.cm-domain-card[data-accent="green"] .cm-domain-icon { background: #eaf5ef; color: #267452; }
.cm-domain-card[data-accent="amber"] .cm-domain-icon { background: #fff4df; color: #a86414; }
.cm-domain-card[data-accent="blue"] .cm-domain-icon { background: #eaf3ff; color: #2b67b5; }
.cm-domain-card[data-accent="plum"] .cm-domain-icon { background: #f4eafa; color: #8144a3; }

.cm-domain-content {
  min-width: 0;
  display: grid;
  gap: 0.45rem;
}

.cm-domain-content > span:last-child {
  color: var(--cm-muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.cm-domain-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.cm-domain-heading strong {
  font-size: 1rem;
}

.cm-domain-heading > span {
  max-width: 8rem;
  padding: 0.18rem 0.45rem;
  border-radius: 99px;
  color: var(--cm-muted);
  background: var(--cm-sand);
  font-size: 0.67rem;
  line-height: 1.25;
  text-align: center;
}

.cm-domain-heading > span.is-live {
  color: var(--cm-success);
  background: #eaf6f0;
}

/* Guided finder */
.cm-explorer {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
}

.cm-finder {
  display: grid;
  gap: 1.2rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid rgba(94, 78, 219, 0.18);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(94, 78, 219, 0.07), transparent 55%),
    var(--cm-surface);
}

.cm-finder-heading {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
}

.cm-finder-heading > div {
  display: grid;
  gap: 0.25rem;
}

.cm-finder-heading h2 {
  font-size: clamp(1.35rem, 2vw, 1.8rem);
}

.cm-finder-heading p:last-child {
  color: var(--cm-muted);
}

.cm-finder-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.cm-finder-field {
  display: grid;
  gap: 0.4rem;
}

.cm-finder-field > span {
  color: var(--cm-ink);
  font-size: 0.8rem;
  font-weight: 650;
}

.cm-finder-field select,
.cm-machine-profile select,
.cm-filter-grid select {
  width: 100%;
  min-height: 44px;
  padding: 0.55rem 2.1rem 0.55rem 0.75rem;
  border: 1px solid var(--cm-line);
  border-radius: 12px;
  background: var(--cm-surface);
  color: var(--cm-ink);
  font: inherit;
}

.cm-finder-field select:focus,
.cm-machine-profile select:focus,
.cm-filter-grid select:focus {
  border-color: var(--cm-violet);
  outline: 3px solid rgba(94, 78, 219, 0.12);
}

.cm-machine-profile {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 0.35fr);
  align-items: center;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--cm-line);
}

.cm-machine-profile > div {
  display: grid;
  gap: 0.2rem;
}

.cm-machine-profile strong {
  font-size: 0.9rem;
}

.cm-machine-profile span {
  color: var(--cm-muted);
  font-size: 0.8rem;
}

/* Results and controls */
.cm-results {
  display: grid;
  gap: 1rem;
}

.cm-results-header,
.cm-results-meta {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

.cm-results-header h2 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
}

.cm-view-switch {
  display: inline-flex;
  padding: 0.2rem;
  border: 1px solid var(--cm-line);
  border-radius: 12px;
  background: var(--cm-sand);
}

.cm-view-switch button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.7rem;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--cm-muted);
}

.cm-view-switch button.is-active {
  background: var(--cm-surface);
  color: var(--cm-ink);
  box-shadow: 0 1px 4px rgba(22, 21, 27, 0.08);
}

.cm-view-switch svg {
  width: 16px;
  height: 16px;
}

.cm-search-bar {
  min-height: 52px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
  padding: 0 0.8rem;
  border: 1px solid var(--cm-line);
  border-radius: 15px;
  background: var(--cm-surface);
  box-shadow: 0 12px 36px -30px rgba(22, 21, 27, 0.5);
}

.cm-search-bar > svg {
  width: 18px;
  height: 18px;
  color: var(--cm-violet);
}

.cm-search-bar input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
}

.cm-search-bar button {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--cm-muted);
}

.cm-search-bar button:hover,
.cm-search-bar button:focus-visible {
  background: var(--cm-sand);
  color: var(--cm-ink);
  outline: none;
}

.cm-search-bar button svg {
  width: 17px;
  height: 17px;
}

.cm-filter-panel {
  border: 1px solid var(--cm-line);
  border-radius: 15px;
  background: var(--cm-surface);
}

.cm-filter-panel > summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0 0.9rem;
  list-style: none;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 650;
}

.cm-filter-panel > summary svg {
  width: 17px;
  height: 17px;
}

.cm-filter-panel > summary svg:last-child {
  margin-left: auto;
}

.cm-filter-panel[open] > summary svg:last-child {
  transform: rotate(180deg);
}

.cm-filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  padding: 0 0.9rem 0.9rem;
}

.cm-filter-grid .cm-finder-field {
  gap: 0.25rem;
}

.cm-filter-reset {
  min-height: 44px;
  align-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 1px solid var(--cm-line);
  border-radius: 12px;
  background: var(--cm-sand);
  color: var(--cm-ink);
}

.cm-filter-reset svg {
  width: 16px;
  height: 16px;
}

.cm-results-meta {
  align-items: center;
  color: var(--cm-muted);
  font-size: 0.88rem;
}

.cm-inline-warning {
  color: var(--cm-warning);
}

.cm-param-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

/* Parameter cards */
.cm-param-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--cm-line);
  border-radius: 20px;
  background: var(--cm-surface);
  box-shadow: 0 1px 2px rgba(22, 21, 27, 0.03);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  content-visibility: auto;
  contain-intrinsic-size: 380px;
}

.cm-param-card:hover {
  box-shadow: 0 22px 50px -32px rgba(22, 21, 27, 0.42);
  transform: translateY(-2px);
}

.cm-param-card-visual {
  min-height: 100%;
  position: relative;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 0.7rem;
  overflow: hidden;
  color: var(--cm-violet);
  background:
    linear-gradient(rgba(94, 78, 219, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(94, 78, 219, 0.07) 1px, transparent 1px),
    var(--cm-violet-soft);
  background-size: 18px 18px;
}

.cm-param-card[data-technology^="fiber"] .cm-param-card-visual {
  color: #27745a;
  background-color: #e9f4ef;
  background-image:
    linear-gradient(rgba(39, 116, 90, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(39, 116, 90, 0.07) 1px, transparent 1px);
}

.cm-param-card-visual > svg {
  width: 34px;
  height: 34px;
  position: relative;
  z-index: 2;
}

.cm-param-card-visual > span:last-child {
  max-width: 7rem;
  position: relative;
  z-index: 2;
  padding: 0.28rem 0.5rem;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.72);
  font-size: 0.68rem;
  text-align: center;
}

.cm-param-card-orbit {
  position: absolute !important;
  width: 90px;
  height: 90px;
  border: 1px solid currentColor;
  border-radius: 50% !important;
  background: transparent !important;
  opacity: 0.24;
  transform: rotate(30deg);
}

.cm-param-card-orbit-two {
  width: 120px;
  height: 48px;
  transform: rotate(-25deg);
}

.cm-param-card-body {
  min-width: 0;
  display: grid;
  gap: 0.9rem;
  padding: 1rem;
}

.cm-param-card-topline,
.cm-param-card-status,
.cm-param-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.cm-param-card-tags {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.cm-param-card-tags span {
  padding: 0.2rem 0.5rem;
  border-radius: 99px;
  background: var(--cm-sand);
  color: var(--cm-muted);
  font-size: 0.68rem;
}

.cm-icon-action {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid var(--cm-line);
  border-radius: 11px;
  background: var(--cm-surface);
  color: var(--cm-muted);
}

.cm-icon-action:hover,
.cm-icon-action:focus-visible,
.cm-icon-action.is-active {
  border-color: rgba(94, 78, 219, 0.4);
  background: var(--cm-violet-soft);
  color: var(--cm-violet);
  outline: none;
}

.cm-icon-action svg {
  width: 17px;
  height: 17px;
}

.cm-param-card-copy {
  display: grid;
  gap: 0.35rem;
}

.cm-param-card-copy h3 {
  font-size: 1.05rem;
}

.cm-param-card-copy h3 a:hover,
.cm-param-card-copy h3 a:focus-visible {
  color: var(--cm-violet);
  outline: none;
}

.cm-param-card-copy p {
  display: -webkit-box;
  overflow: hidden;
  color: var(--cm-muted);
  font-size: 0.83rem;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.cm-param-card-context {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  margin: 0;
}

.cm-param-card-context > div {
  min-width: 0;
  display: grid;
  gap: 0.1rem;
}

.cm-param-card-context dt {
  color: var(--cm-muted);
  font-size: 0.65rem;
}

.cm-param-card-context dd {
  margin: 0;
  overflow: hidden;
  font-size: 0.78rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cm-param-card-values {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.cm-param-mini {
  min-width: 0;
  display: grid;
  gap: 0.2rem;
  padding: 0.55rem;
  border: 1px solid rgba(22, 21, 27, 0.06);
  border-radius: 10px;
  background: var(--cm-canvas);
}

.cm-param-mini > span:first-child {
  overflow: hidden;
  color: var(--cm-muted);
  font-size: 0.63rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cm-param-mini strong {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
}

.cm-param-mini-track {
  height: 3px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(94, 78, 219, 0.1);
}

.cm-param-mini-track > span {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--cm-violet);
}

.cm-evidence-pill,
.cm-safety-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  font-size: 0.66rem;
}

.cm-evidence-pill {
  color: var(--cm-success);
}

.cm-safety-pill {
  color: var(--cm-muted);
}

.cm-safety-pill.is-caution,
.cm-safety-pill.is-unknown {
  color: var(--cm-warning);
}

.cm-evidence-pill svg,
.cm-safety-pill svg {
  width: 13px;
  height: 13px;
}

.cm-param-card-footer {
  padding-top: 0.7rem;
  border-top: 1px solid var(--cm-line);
  color: var(--cm-muted);
  font-size: 0.68rem;
}

.cm-text-link {
  color: var(--cm-violet);
  font-weight: 650;
}

.cm-text-link:hover,
.cm-text-link:focus-visible {
  text-decoration: underline;
  outline: none;
}

/* Featured cards on home */
.cm-feature-card {
  display: grid;
  grid-template-columns: minmax(0, 0.65fr) minmax(0, 1.35fr);
  padding: 0;
  overflow: hidden;
}

.cm-feature-card-visual {
  min-height: 260px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0.8rem;
  color: var(--cm-violet);
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.8) 0 3px, transparent 4px) 0 0 / 18px 18px,
    linear-gradient(145deg, #ede8fb, #f9f6ff);
}

.cm-feature-card-visual > span {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 15px 32px -20px rgba(94, 78, 219, 0.58);
}

.cm-feature-card-visual svg {
  width: 27px;
  height: 27px;
}

.cm-feature-card-visual small {
  padding: 0.25rem 0.5rem;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.72);
}

.cm-feature-card-body {
  min-width: 0;
  display: grid;
  gap: 0.7rem;
  padding: 1.1rem;
}

.cm-feature-card-topline {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

.cm-evidence-mini {
  color: var(--cm-success);
}

.cm-evidence-mini svg {
  width: 16px;
  height: 16px;
}

.cm-feature-params {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
  margin: 0;
}

.cm-feature-params > div {
  min-width: 0;
  display: grid;
  gap: 0.12rem;
  padding: 0.45rem;
  border-radius: 9px;
  background: var(--cm-canvas);
}

.cm-feature-params dt {
  overflow: hidden;
  color: var(--cm-muted);
  font-size: 0.62rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cm-feature-params dd {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.76rem;
}

.cm-feature-card .cm-card-meta {
  display: grid;
  gap: 0.1rem;
}

.cm-feature-card .cm-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--cm-violet);
}

.cm-feature-card .cm-card-link svg {
  width: 15px;
  height: 15px;
}

/* Table and matrix */
.cm-data-scroll,
.cm-compare-scroll {
  max-width: 100%;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--cm-line);
  border-radius: 18px;
  background: var(--cm-surface);
  --popup-scroll-inset: 1.1rem;
}

.cm-data-table,
.cm-matrix,
.cm-compare-table {
  width: 100%;
  min-width: 720px;
  border-collapse: separate;
  border-spacing: 0;
}

.cm-data-table th,
.cm-data-table td,
.cm-matrix th,
.cm-matrix td,
.cm-compare-table th,
.cm-compare-table td {
  padding: 0.8rem;
  border-right: 1px solid var(--cm-line);
  border-bottom: 1px solid var(--cm-line);
  text-align: left;
  vertical-align: top;
}

.cm-data-table tr:last-child > *,
.cm-matrix tr:last-child > *,
.cm-compare-table tr:last-child > * {
  border-bottom: 0;
}

.cm-data-table tr > *:last-child,
.cm-matrix tr > *:last-child,
.cm-compare-table tr > *:last-child {
  border-right: 0;
}

.cm-data-table thead th,
.cm-matrix thead th,
.cm-compare-table thead th {
  background: var(--cm-sand);
  color: var(--cm-muted);
  font-size: 0.72rem;
}

.cm-data-table tbody th,
.cm-matrix tbody th,
.cm-compare-table tbody th {
  font-size: 0.82rem;
}

.cm-data-table td,
.cm-matrix td,
.cm-compare-table td {
  color: var(--cm-muted);
  font-size: 0.8rem;
}

.cm-data-table a,
.cm-matrix a {
  color: var(--cm-violet);
}

.cm-matrix td a {
  display: block;
  padding: 0.35rem 0.45rem;
  border-radius: 8px;
  background: var(--cm-violet-soft);
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.cm-matrix td a + a {
  margin-top: 0.3rem;
}

.cm-matrix-empty {
  color: #b4afa7;
}

/* Compare */
.cm-compare-tray {
  position: fixed;
  z-index: 45;
  left: 50%;
  bottom: 1rem;
  width: min(880px, calc(100vw - 2rem));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(22, 21, 27, 0.94);
  color: #fff;
  box-shadow: 0 28px 72px -30px rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
}

.cm-compare-tray-copy {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.cm-compare-tray-copy > svg {
  width: 20px;
  height: 20px;
  color: #a895ff;
}

.cm-compare-tray-copy > div {
  min-width: 0;
  display: grid;
}

.cm-compare-tray-copy strong {
  font-size: 0.82rem;
}

.cm-compare-tray-copy span {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.63);
  font-size: 0.7rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cm-compare-tray-actions {
  display: flex;
  gap: 0.45rem;
}

.cm-compare-tray .cm-btn-ghost,
.cm-compare-tray .cm-btn-primary {
  min-height: 40px;
  padding: 0.48rem 0.8rem;
  border-radius: 11px;
}

.cm-compare-tray .cm-btn-ghost {
  border-color: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.cm-modal-layer {
  position: fixed;
  z-index: 90;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(22, 21, 27, 0.62);
  backdrop-filter: blur(10px);
}

.cm-compare-modal {
  width: min(1080px, 100%);
  max-height: min(86dvh, 820px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 1rem;
  overflow: hidden;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 24px;
  background: var(--cm-canvas);
  box-shadow: 0 30px 90px -25px rgba(0, 0, 0, 0.55);
}

.cm-compare-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.cm-compare-modal-header h2 {
  font-size: 1.5rem;
}

.cm-compare-scroll {
  min-height: 0;
  --popup-scroll-inset: 1.5rem;
}

.cm-compare-table th:not(:first-child) {
  min-width: 220px;
}

.cm-compare-table thead th > span {
  display: inline-block;
  max-width: 175px;
}

.cm-compare-table thead button {
  float: right;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: rgba(22, 21, 27, 0.05);
  color: var(--cm-muted);
}

.cm-compare-table thead button svg {
  width: 14px;
  height: 14px;
}

/* Domain hub and empty state */
.cm-back-link {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--cm-muted);
  font-size: 0.88rem;
}

.cm-back-link svg {
  width: 16px;
  height: 16px;
}

.cm-back-link:hover,
.cm-back-link:focus-visible {
  color: var(--cm-violet);
  outline: none;
}

.cm-domain-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.2rem;
  padding: clamp(1.4rem, 4vw, 2.4rem);
  border: 1px solid rgba(94, 78, 219, 0.16);
  border-radius: 24px;
  background:
    radial-gradient(circle at 90% 10%, rgba(94, 78, 219, 0.12), transparent 36%),
    var(--cm-surface);
}

.cm-domain-hero-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: var(--cm-violet-soft);
  color: var(--cm-violet);
}

.cm-domain-hero-icon svg {
  width: 30px;
  height: 30px;
}

.cm-domain-hero > div {
  display: grid;
  gap: 0.35rem;
}

.cm-domain-hero h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
}

.cm-domain-status {
  padding: 0.35rem 0.65rem;
  border-radius: 99px;
  background: var(--cm-sand);
  color: var(--cm-muted);
  font-size: 0.72rem;
}

.cm-domain-status.is-available {
  background: #eaf6f0;
  color: var(--cm-success);
}

.cm-building-panel,
.cm-empty-state {
  display: grid;
  justify-items: center;
  gap: 0.8rem;
  padding: clamp(2rem, 6vw, 4rem);
  border: 1px dashed rgba(94, 78, 219, 0.32);
  border-radius: 24px;
  background: linear-gradient(145deg, var(--cm-surface), var(--cm-violet-soft));
  text-align: center;
}

.cm-building-panel > div,
.cm-empty-state {
  max-width: 38rem;
}

.cm-building-panel p,
.cm-empty-state p {
  color: var(--cm-muted);
}

/* Popup scrollbar: inset keeps thumbs clear of rounded corners. */
.popup-scroll::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.popup-scroll::-webkit-scrollbar-track {
  margin-block: var(--popup-scroll-inset, 0.75rem);
  margin-inline: var(--popup-scroll-inset, 0.75rem);
  background: transparent;
}

.popup-scroll::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 99px;
  background: rgba(109, 105, 98, 0.38);
  background-clip: padding-box;
}

@supports not selector(::-webkit-scrollbar) {
  .popup-scroll {
    scrollbar-color: rgba(109, 105, 98, 0.38) transparent;
    scrollbar-width: thin;
  }
}

.cm-loading-stack {
  display: grid;
  gap: 1rem;
}

.cm-skeleton {
  overflow: hidden;
  border-radius: 16px;
  background: linear-gradient(90deg, #efebe5 25%, #f8f6f2 50%, #efebe5 75%);
  background-size: 200% 100%;
  animation: cm-shimmer 1.5s infinite;
}

.cm-skeleton-back { width: 10rem; height: 24px; }
.cm-skeleton-hero { height: 230px; }
.cm-skeleton-panel { height: 180px; }
.cm-skeleton-card { height: 310px; }

@keyframes cm-shimmer {
  to { background-position: -200% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .cm-skeleton {
    animation-duration: 0.01ms;
  }
}

@media (max-width: 1040px) {
  .cm-nav-desktop {
    display: none;
  }

  .cm-mobile-nav {
    display: block;
  }

  .cm-home-hero,
  .cm-library-hero {
    grid-template-columns: 1fr;
  }

  .cm-home-hero-stage,
  .cm-library-hero-art {
    min-height: 20rem;
  }

  .cm-domain-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cm-param-grid {
    grid-template-columns: 1fr;
  }

  .cm-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .cm-main,
  .cm-header-inner {
    width: min(100% - 1.25rem, 1240px);
  }

  .cm-brand-text {
    font-size: 0.92rem;
  }

  .cm-home-hero,
  .cm-library-hero {
    min-height: auto;
    padding: 1.35rem;
    border-radius: 22px;
  }

  .cm-home-hero h1,
  .cm-library-hero h1 {
    max-width: none;
    font-size: clamp(2.3rem, 12vw, 3.55rem);
  }

  .cm-hero-search {
    grid-template-columns: auto minmax(0, 1fr);
    border-radius: 16px;
    padding: 0.65rem 0.75rem;
  }

  .cm-hero-search button {
    grid-column: 1 / -1;
    width: 100%;
    justify-content: center;
  }

  .cm-home-hero-stage,
  .cm-library-hero-art {
    min-height: 17rem;
  }

  .cm-stage-card-main {
    width: 68%;
  }

  .cm-stage-card-bottom {
    display: none;
  }

  .cm-home-stats {
    grid-template-columns: 1fr;
  }

  .cm-domain-grid,
  .cm-finder-grid,
  .cm-machine-profile,
  .cm-param-card-context {
    grid-template-columns: 1fr;
  }

  .cm-domain-card {
    min-height: auto;
  }

  .cm-results-header {
    align-items: flex-start;
  }

  .cm-view-switch button span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .cm-filter-grid {
    grid-template-columns: 1fr;
  }

  .cm-param-card {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .cm-param-card-values {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cm-param-card-status,
  .cm-param-card-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .cm-feature-card {
    grid-template-columns: 1fr;
  }

  .cm-feature-card-visual {
    min-height: 150px;
  }

  .cm-compare-tray {
    align-items: stretch;
    flex-direction: column;
  }

  .cm-compare-tray-actions > * {
    flex: 1;
  }

  .cm-domain-hero {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
  }

  .cm-domain-status {
    grid-column: 1 / -1;
    width: fit-content;
  }
}

@media (max-width: 420px) {
  .cm-header-inner {
    min-height: 60px;
  }

  .cm-brand-mark {
    width: 34px;
    height: 34px;
  }

  .cm-domain-card {
    padding: 0.9rem;
  }

  .cm-param-card {
    grid-template-columns: 1fr;
  }

  .cm-param-card-visual {
    min-height: 104px;
  }

  .cm-param-card-orbit {
    width: 120px;
  }

  .cm-feature-params {
    grid-template-columns: 1fr;
  }
}

/* Parameter detail */
.cm-recipe-detail {
  gap: clamp(1.5rem, 4vw, 3.5rem);
}

.cm-recipe-hero {
  min-height: 360px;
  display: grid;
  grid-template-columns: minmax(260px, 0.7fr) minmax(0, 1.3fr);
  align-items: stretch;
  overflow: hidden;
  border: 1px solid rgba(94, 78, 219, 0.15);
  border-radius: 28px;
  background: var(--cm-surface);
}

.cm-recipe-hero-art {
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0.8rem;
  overflow: hidden;
  color: var(--cm-violet);
  background:
    linear-gradient(rgba(94, 78, 219, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(94, 78, 219, 0.08) 1px, transparent 1px),
    linear-gradient(145deg, #eee9fc, #faf7ff);
  background-size: 28px 28px, 28px 28px, auto;
}

.cm-recipe-hero[data-technology^="fiber"] .cm-recipe-hero-art {
  color: #27745a;
  background:
    linear-gradient(rgba(39, 116, 90, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(39, 116, 90, 0.08) 1px, transparent 1px),
    linear-gradient(145deg, #e5f3ec, #f6fbf8);
  background-size: 28px 28px, 28px 28px, auto;
}

.cm-recipe-hero-art > svg {
  width: 54px;
  height: 54px;
  position: relative;
  z-index: 2;
}

.cm-recipe-hero-art > strong {
  position: relative;
  z-index: 2;
  padding: 0.4rem 0.7rem;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.75);
  font-family: var(--font-mono);
}

.cm-recipe-ring {
  position: absolute;
  width: 210px;
  height: 210px;
  border: 1px solid currentColor;
  border-radius: 50%;
  opacity: 0.2;
  transform: rotate(18deg);
}

.cm-recipe-ring-two {
  width: 280px;
  height: 105px;
  transform: rotate(-28deg);
}

.cm-recipe-hero-copy {
  display: grid;
  align-content: center;
  gap: 1rem;
  padding: clamp(1.5rem, 5vw, 4rem);
}

.cm-recipe-hero-copy h1 {
  max-width: 16ch;
  font-size: clamp(2.35rem, 5vw, 4.6rem);
  line-height: 1;
}

.cm-recipe-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1rem;
  padding-top: 0.3rem;
}

.cm-recipe-trust > span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--cm-muted);
  font-size: 0.76rem;
}

.cm-recipe-trust > span svg {
  width: 15px;
  height: 15px;
}

.cm-detail-context,
.cm-detail-parameters,
.cm-evidence-panel {
  display: grid;
  gap: 1.15rem;
}

.cm-detail-context > header {
  display: grid;
  gap: 0.35rem;
}

.cm-detail-context > header h2 {
  font-size: clamp(1.55rem, 2.8vw, 2.2rem);
}

.cm-detail-context dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--cm-line);
  border-radius: 18px;
  background: var(--cm-line);
}

.cm-detail-context dl > div {
  min-width: 0;
  display: grid;
  gap: 0.25rem;
  padding: 1rem;
  background: var(--cm-surface);
}

.cm-detail-context dt,
.cm-evidence-summary dt {
  color: var(--cm-muted);
  font-size: 0.7rem;
}

.cm-detail-context dd,
.cm-evidence-summary dd {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 620;
}

.cm-detail-context dd a {
  color: var(--cm-violet);
}

.cm-detail-context dd a:hover,
.cm-detail-context dd a:focus-visible {
  text-decoration: underline;
  outline: none;
}

.cm-detail-param-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: 0.75rem;
}

.cm-detail-param {
  min-width: 0;
  display: grid;
  gap: 0.5rem;
  padding: 1rem;
  border: 1px solid var(--cm-line);
  border-radius: 16px;
  background: var(--cm-surface);
}

.cm-detail-param > span:first-child {
  color: var(--cm-muted);
  font-size: 0.72rem;
}

.cm-detail-param strong {
  font-size: 1.35rem;
}

.cm-detail-param p {
  color: var(--cm-muted);
  font-size: 0.75rem;
}

.cm-detail-param-track {
  height: 6px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--cm-violet-soft);
}

.cm-detail-param-track > span {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cm-violet), #a68bff);
}

.cm-detail-advice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.cm-advice-card {
  display: grid;
  gap: 0.85rem;
  padding: 1.2rem;
  border: 1px solid var(--cm-line);
  border-radius: 18px;
  background: var(--cm-surface);
}

.cm-advice-card header {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.cm-advice-card header svg {
  width: 21px;
  height: 21px;
}

.cm-advice-card h2 {
  font-size: 1.15rem;
}

.cm-advice-card ul,
.cm-safety-panel ul {
  margin: 0;
  padding-left: 1.15rem;
}

.cm-advice-card li,
.cm-safety-panel li {
  margin: 0.4rem 0;
  color: var(--cm-muted);
  font-size: 0.88rem;
}

.cm-advice-card.is-do {
  border-color: rgba(31, 122, 84, 0.22);
  background: linear-gradient(145deg, #fff, #f2faf6);
}

.cm-advice-card.is-do header {
  color: var(--cm-success);
}

.cm-advice-card.is-dont {
  border-color: rgba(167, 92, 19, 0.22);
  background: linear-gradient(145deg, #fff, #fff7ee);
}

.cm-advice-card.is-dont header {
  color: var(--cm-warning);
}

.cm-safety-panel,
.cm-test-panel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1rem;
  padding: clamp(1.2rem, 3vw, 1.8rem);
  border: 1px solid rgba(167, 92, 19, 0.25);
  border-radius: 20px;
  background:
    linear-gradient(145deg, rgba(255, 247, 238, 0.9), rgba(255, 255, 255, 0.9));
}

.cm-safety-panel .cm-icon-tile {
  color: var(--cm-warning);
  background: #fff0dd;
}

.cm-safety-panel > div,
.cm-test-panel > div {
  display: grid;
  gap: 0.5rem;
}

.cm-safety-panel h2,
.cm-test-panel h2 {
  font-size: 1.35rem;
}

.cm-safety-panel p,
.cm-test-panel p {
  color: var(--cm-muted);
}

.cm-test-panel {
  border-color: rgba(94, 78, 219, 0.22);
  background: linear-gradient(145deg, var(--cm-violet-soft), #fff);
}

.cm-test-panel .cm-note {
  padding: 0.7rem 0.8rem;
  border-left: 3px solid var(--cm-violet);
  border-radius: 0 10px 10px 0;
  background: rgba(255, 255, 255, 0.7);
}

.cm-evidence-summary {
  display: grid;
  grid-template-columns: minmax(180px, 0.45fr) minmax(0, 1fr);
  align-items: stretch;
  gap: 1rem;
}

.cm-evidence-summary > div {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 1rem;
  border-radius: 16px;
  background: #eaf6f0;
  color: var(--cm-success);
}

.cm-evidence-summary > div svg {
  width: 22px;
  height: 22px;
}

.cm-evidence-summary dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  margin: 0;
}

.cm-evidence-summary dl > div {
  display: grid;
  gap: 0.25rem;
  padding: 0.85rem;
  border: 1px solid var(--cm-line);
  border-radius: 13px;
  background: var(--cm-surface);
}

.cm-source-list {
  display: grid;
  gap: 0.5rem;
}

.cm-source-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--cm-line);
  border-radius: 13px;
  background: var(--cm-surface);
}

.cm-source-list a:hover,
.cm-source-list a:focus-visible {
  border-color: rgba(94, 78, 219, 0.38);
  outline: none;
}

.cm-source-list a > span {
  display: grid;
  gap: 0.1rem;
}

.cm-source-list small {
  color: var(--cm-muted);
}

.cm-source-list svg {
  width: 17px;
  height: 17px;
  color: var(--cm-violet);
}

.cm-recipe-detail .cm-cta .cm-btn-ghost {
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}

.cm-recipe-detail .cm-cta .cm-btn-ghost:hover,
.cm-recipe-detail .cm-cta .cm-btn-ghost:focus-visible {
  background: rgba(255, 255, 255, 0.12);
}

@media (max-width: 800px) {
  .cm-recipe-hero {
    grid-template-columns: 1fr;
  }

  .cm-recipe-hero-art {
    min-height: 190px;
  }

  .cm-detail-context dl,
  .cm-evidence-summary dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .cm-detail-advice-grid,
  .cm-evidence-summary {
    grid-template-columns: 1fr;
  }

  .cm-detail-context dl,
  .cm-evidence-summary dl {
    grid-template-columns: 1fr;
  }

  .cm-safety-panel,
  .cm-test-panel {
    grid-template-columns: 1fr;
  }
}

/* Grounded public parameter assistant */
.cm-assistant {
  display: grid;
  gap: 1rem;
  padding: clamp(1.2rem, 3.5vw, 2.2rem);
  overflow: hidden;
  position: relative;
  isolation: isolate;
  border: 1px solid rgba(94, 78, 219, 0.2);
  border-radius: 24px;
  background:
    radial-gradient(circle at 95% 5%, rgba(255, 125, 103, 0.12), transparent 28%),
    radial-gradient(circle at 0% 100%, rgba(94, 78, 219, 0.13), transparent 34%),
    linear-gradient(145deg, #fff, #f8f5ff);
}

.cm-assistant::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 230px;
  height: 230px;
  top: -145px;
  right: 12%;
  border: 1px solid rgba(94, 78, 219, 0.18);
  border-radius: 50%;
  box-shadow:
    0 0 0 38px rgba(94, 78, 219, 0.03),
    0 0 0 76px rgba(94, 78, 219, 0.025);
}

.cm-assistant-intro {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.cm-assistant-intro > div {
  display: grid;
  gap: 0.35rem;
}

.cm-assistant-intro h2 {
  max-width: 27ch;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
}

.cm-assistant-intro p:last-child {
  max-width: 48rem;
  color: var(--cm-muted);
}

.cm-assistant-avatar {
  width: 56px;
  height: 56px;
  flex: 0 0 auto;
  position: relative;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(145deg, var(--cm-violet), #846dff);
  color: #fff;
  box-shadow: 0 18px 36px -18px rgba(94, 78, 219, 0.62);
}

.cm-assistant-avatar > svg:last-child {
  width: 25px;
  height: 25px;
}

.cm-assistant-avatar > svg:first-child {
  position: absolute;
  width: 14px;
  height: 14px;
  top: -4px;
  right: -4px;
  color: #ff9d77;
  filter: drop-shadow(0 0 5px rgba(255, 157, 119, 0.55));
}

.cm-assistant-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 0.65rem;
  padding: 0.55rem;
  border: 1px solid rgba(94, 78, 219, 0.2);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 44px -34px rgba(22, 21, 27, 0.48);
}

.cm-assistant-form textarea {
  width: 100%;
  min-height: 76px;
  resize: vertical;
  padding: 0.65rem 0.75rem;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--cm-ink);
  font: inherit;
  line-height: 1.45;
}

.cm-assistant-form button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.65rem 0.9rem;
  border: 0;
  border-radius: 13px;
  background: var(--cm-violet);
  color: #fff;
  font-weight: 650;
}

.cm-assistant-form button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.cm-assistant-form button:not(:disabled):hover,
.cm-assistant-form button:not(:disabled):focus-visible {
  background: hsl(246 69% 40%);
  outline: 3px solid rgba(94, 78, 219, 0.14);
}

.cm-assistant-form button svg {
  width: 17px;
  height: 17px;
}

.cm-spin {
  animation: cm-spin 0.8s linear infinite;
}

@keyframes cm-spin {
  to { transform: rotate(360deg); }
}

.cm-assistant-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

/* Rückfragen stehen untereinander: je Frage eine Zeile mit ihren
   anklickbaren Antworten. Antippen ergänzt das Textfeld, es sendet NICHT —
   deshalb steht der Hinweis darüber und nicht als Tooltip am Button. */
.cm-assistant-followups {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cm-assistant-followups-hint {
  margin: 0;
  color: var(--cm-muted);
  font-size: 0.72rem;
  line-height: 1.45;
}

.cm-assistant-followup {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.cm-assistant-followup-question {
  margin: 0;
  color: var(--cm-ink, #201d19);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.4;
}

.cm-assistant-followup-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

/* Bereits übernommene Antwort: sichtbar anders, damit niemand zweimal tippt
   und sich fragt, warum nichts passiert (ein zweiter Klick ist ein No-op). */
.cm-assistant-followups button[data-picked='true'] {
  border-color: rgba(94, 78, 219, 0.45);
  background: var(--cm-violet-soft);
  color: var(--cm-violet);
}

/* Am Telefon wird getippt, nicht geklickt — die Pillen brauchen dort eine
   bequeme Trefferfläche. */
@media (max-width: 640px) {
  .cm-assistant-followups button {
    padding: 0.6rem 0.85rem;
    font-size: 0.8rem;
  }
}

.cm-assistant-examples button,
.cm-assistant-followups button {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.65rem;
  border: 1px solid rgba(94, 78, 219, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--cm-muted);
  font-size: 0.75rem;
  text-align: left;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.cm-assistant-examples button:hover,
.cm-assistant-examples button:focus-visible,
.cm-assistant-followups button:hover,
.cm-assistant-followups button:focus-visible {
  border-color: rgba(94, 78, 219, 0.45);
  background: #fff;
  color: var(--cm-violet);
  outline: none;
}

.cm-assistant-examples svg,
.cm-assistant-followups svg {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
}

.cm-assistant-error {
  margin: 0;
  padding: 0.7rem 0.8rem;
  border-radius: 11px;
  background: #fff0eb;
  color: #984126;
  font-size: 0.82rem;
}

.cm-assistant-answer {
  display: grid;
  gap: 0.8rem;
  padding: 1rem;
  border: 1px solid rgba(94, 78, 219, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.84);
}

.cm-assistant-message {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.65rem;
}

.cm-assistant-mini-avatar {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--cm-violet);
  color: #fff;
}

.cm-assistant-mini-avatar svg {
  width: 15px;
  height: 15px;
}

.cm-assistant-message > div {
  display: grid;
  gap: 0.25rem;
}

.cm-assistant-message strong {
  font-size: 0.78rem;
}

.cm-assistant-message p {
  color: var(--cm-muted);
  line-height: 1.55;
  white-space: pre-wrap;
}

.cm-assistant-sources {
  display: grid;
  gap: 0.55rem;
}

.cm-assistant-sources-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--cm-success);
  font-size: 0.78rem;
}

.cm-assistant-sources-title svg {
  width: 16px;
  height: 16px;
}

.cm-assistant-source-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 0.5rem;
}

.cm-assistant-source-grid > a {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.55rem;
  padding: 0.75rem;
  border: 1px solid var(--cm-line);
  border-radius: 13px;
  background: var(--cm-canvas);
}

.cm-assistant-source-grid > a:hover,
.cm-assistant-source-grid > a:focus-visible {
  border-color: rgba(94, 78, 219, 0.4);
  background: #fff;
  outline: none;
}

.cm-assistant-source-grid > a > span:first-child {
  min-width: 0;
  display: grid;
  gap: 0.15rem;
}

.cm-assistant-source-grid strong,
.cm-assistant-source-grid small {
  overflow-wrap: anywhere;
}

.cm-assistant-source-grid small {
  color: var(--cm-muted);
  font-size: 0.67rem;
}

.cm-assistant-source-grid > a > svg {
  width: 15px;
  height: 15px;
  color: var(--cm-violet);
}

.cm-assistant-source-values {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.cm-assistant-source-values small {
  padding: 0.18rem 0.35rem;
  border-radius: 6px;
  background: var(--cm-violet-soft);
  color: var(--cm-violet);
  font-family: var(--font-mono);
}

.cm-assistant-notice {
  margin: 0;
  color: var(--cm-muted);
  font-size: 0.72rem;
}

@media (prefers-reduced-motion: reduce) {
  .cm-spin {
    animation-duration: 0.01ms;
  }
}

@media (max-width: 640px) {
  .cm-assistant-intro {
    display: grid;
  }

  .cm-assistant-form {
    grid-template-columns: 1fr;
  }

  .cm-assistant-form button {
    width: 100%;
  }
}
