.ch-active-search {
  color-scheme: dark;
  --ch-bg: #080b13;
  --ch-panel: rgba(17, 22, 35, 0.88);
  --ch-panel-strong: #131a2a;
  --ch-line: rgba(255, 255, 255, 0.11);
  --ch-text: #f7f8fb;
  --ch-muted: #9ea9bd;
  --ch-lime: #d7ff48;
  --ch-cyan: #5be7e7;
  --ch-violet: #8f7cff;
  --ch-danger: #ff727f;
  --ch-radius: 24px;
  color: var(--ch-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  width: 100%;
}

.ch-active-search,
.ch-active-search *,
.ch-active-search *::before,
.ch-active-search *::after { box-sizing: border-box; }

.ch-active-search button,
.ch-active-search input { font: inherit; }

.ch-active-search img,
.ch-active-search svg { display: block; max-width: 100%; }

.demo-shell {
  width: 100%;
  min-height: 100vh;
  margin: 0;
  overflow-x: clip;
  background:
    radial-gradient(circle at 78% 4%, rgba(91, 231, 231, 0.15), transparent 32rem),
    radial-gradient(circle at 8% 35%, rgba(143, 124, 255, 0.13), transparent 30rem),
    #080b13;
}
.ch-active-search .ch-shell { width: min(100%, 1500px); margin: 0 auto; padding: clamp(22px, 4vw, 58px); }

.ch-active-search .ch-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 6vw, 74px);
  border: 1px solid var(--ch-line);
  border-radius: clamp(24px, 4vw, 40px);
  background:
    linear-gradient(135deg, rgba(215, 255, 72, 0.08), transparent 35%),
    linear-gradient(160deg, rgba(25, 32, 50, 0.96), rgba(11, 15, 25, 0.96));
  box-shadow: 0 34px 100px rgba(0, 0, 0, 0.34);
}

.ch-active-search .ch-hero::after {
  content: "";
  position: absolute;
  width: 330px;
  height: 330px;
  right: -120px;
  top: -160px;
  border: 1px solid rgba(215, 255, 72, 0.28);
  border-radius: 50%;
  box-shadow: 0 0 80px rgba(215, 255, 72, 0.12);
  pointer-events: none;
}

.ch-active-search .ch-eyebrow { color: var(--ch-lime); font-size: 12px; font-weight: 800; letter-spacing: .15em; }
.ch-active-search .ch-title { max-width: 850px; margin: 16px 0 12px; color: var(--ch-text); font-size: clamp(42px, 7vw, 92px); line-height: .95; letter-spacing: -.055em; }
.ch-active-search .ch-lead { max-width: 760px; margin: 0; color: var(--ch-muted); font-size: clamp(16px, 2vw, 21px); line-height: 1.55; }

.ch-active-search .ch-search-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; margin-top: 36px; }
.ch-active-search .ch-input-wrap { min-width: 0; }
.ch-active-search .ch-input {
  width: 100%;
  height: 66px;
  min-width: 0;
  padding: 0 24px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 18px;
  outline: none;
  background: rgba(4, 7, 13, .72);
  color: var(--ch-text);
  font-size: clamp(16px, 2vw, 20px);
  transition: border-color .2s, box-shadow .2s;
}
.ch-active-search .ch-input:focus { border-color: var(--ch-cyan); box-shadow: 0 0 0 4px rgba(91,231,231,.12); }
.ch-active-search .ch-input::placeholder { color: #748096; }

.ch-active-search .ch-submit {
  position: relative;
  min-width: 148px;
  height: 66px;
  padding: 0 30px;
  border: 0;
  border-radius: 18px;
  background: var(--ch-lime);
  color: #10140a;
  font-weight: 900;
  letter-spacing: .08em;
  cursor: pointer;
  overflow: hidden;
}
.ch-active-search .ch-submit:disabled { cursor: wait; opacity: .75; }
.ch-active-search .ch-submit__label { position: relative; z-index: 1; }
.ch-active-search .ch-submit__pulse { position: absolute; inset: 0; background: linear-gradient(110deg, transparent 20%, rgba(255,255,255,.6), transparent 70%); transform: translateX(-120%); }
.ch-active-search[data-state="SEARCHING"] .ch-submit__pulse { animation: ch-scan 1s linear infinite; }
@keyframes ch-scan { to { transform: translateX(120%); } }

.ch-active-search .ch-mode-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 18px; color: var(--ch-muted); font-size: 13px; }
.ch-active-search .ch-mode-badge { padding: 7px 10px; border: 1px solid rgba(91,231,231,.35); border-radius: 999px; color: var(--ch-cyan); font-weight: 800; letter-spacing: .08em; }

.ch-active-search .ch-status { min-height: 30px; margin: 26px 4px 10px; color: var(--ch-muted); font-size: 14px; }
.ch-active-search[data-state="SEARCHING"] .ch-status { color: var(--ch-cyan); }
.ch-active-search[data-state="ERROR"] .ch-status,
.ch-active-search[data-state="BLOCKED"] .ch-status { color: var(--ch-danger); }

.ch-active-search .ch-summary { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin: 26px 0 18px; }
.ch-active-search .ch-summary__title { margin: 0; color: var(--ch-text); font-size: clamp(24px, 4vw, 38px); letter-spacing: -.035em; }
.ch-active-search .ch-summary__meta { margin: 0; max-width: 560px; color: var(--ch-muted); font-size: 13px; text-align: right; }
.ch-active-search .ch-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }

.ch-active-search .ch-result {
  display: grid;
  grid-template-columns: minmax(150px, 34%) minmax(0, 1fr);
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--ch-line);
  border-radius: var(--ch-radius);
  background: var(--ch-panel);
  box-shadow: 0 20px 55px rgba(0,0,0,.2);
}
.ch-active-search .ch-result__visual { position: relative; min-height: 310px; background: linear-gradient(145deg, #1c2637, #0d111c); overflow: hidden; }
.ch-active-search .ch-result__image { width: 100%; height: 100%; object-fit: cover; }
.ch-active-search .ch-result__image-placeholder { display: grid; place-items: center; height: 100%; color: var(--ch-lime); font-size: 48px; font-weight: 900; }
.ch-active-search .ch-result__provenance { position: absolute; left: 12px; bottom: 12px; padding: 7px 9px; border-radius: 999px; background: rgba(4,7,13,.82); color: var(--ch-cyan); font-size: 10px; font-weight: 900; letter-spacing: .1em; }
.ch-active-search .ch-result__body { display: flex; min-width: 0; flex-direction: column; padding: 22px; }
.ch-active-search .ch-result__title { margin: 0; color: var(--ch-text); font-size: clamp(19px, 2.2vw, 26px); line-height: 1.12; letter-spacing: -.025em; overflow-wrap: anywhere; }

.ch-active-search .ch-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 12px; margin-top: 18px; }
.ch-active-search .ch-price__current { color: var(--ch-text); font-size: 28px; }
.ch-active-search .ch-price__reference { color: #818ca0; text-decoration: line-through; }
.ch-active-search .ch-price__delta { color: var(--ch-lime); font-size: 12px; font-weight: 800; }
.ch-active-search .ch-price__unavailable { color: var(--ch-muted); }

.ch-active-search .ch-score-row { display: flex; align-items: center; gap: 12px; margin-top: 18px; padding: 12px; border: 1px solid var(--ch-line); border-radius: 16px; background: rgba(255,255,255,.025); }
.ch-active-search .ch-score { display: grid; place-items: center; width: 54px; height: 54px; flex: 0 0 auto; border-radius: 16px; background: linear-gradient(145deg, var(--ch-lime), #a9d815); color: #0b1005; font-size: 22px; font-weight: 950; }
.ch-active-search .ch-score-copy { display: flex; min-width: 0; flex-direction: column; gap: 3px; }
.ch-active-search .ch-score-copy__label { font-size: 12px; font-weight: 900; letter-spacing: .05em; }
.ch-active-search .ch-score-copy__meta { color: var(--ch-muted); font-size: 11px; }

.ch-active-search .ch-history { margin-top: 17px; }
.ch-active-search .ch-history__label { margin-bottom: 7px; color: var(--ch-muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.ch-active-search .ch-history__graph { width: 100%; height: 74px; border-radius: 12px; background: rgba(3,6,11,.45); }
.ch-active-search .ch-history__guide { stroke: rgba(255,255,255,.1); stroke-width: 1; }
.ch-active-search .ch-history__line { fill: none; stroke: var(--ch-cyan); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 7px rgba(91,231,231,.35)); }

.ch-active-search .ch-result__footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 18px; }
.ch-active-search .ch-result__id { max-width: 130px; overflow: hidden; color: #788499; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.ch-active-search .ch-cta { padding: 11px 14px; border: 1px solid rgba(215,255,72,.35); border-radius: 12px; background: rgba(215,255,72,.06); color: var(--ch-lime); font-size: 11px; font-weight: 900; letter-spacing: .07em; }
.ch-active-search .ch-cta:disabled { opacity: .8; }

.ch-active-search .ch-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 980px) {
  .ch-active-search .ch-grid { grid-template-columns: 1fr; }
  .ch-active-search .ch-result { grid-template-columns: minmax(160px, 30%) minmax(0, 1fr); }
}

@media (max-width: 620px) {
  .ch-active-search .ch-shell { padding: 14px; }
  .ch-active-search .ch-hero { padding: 26px 20px; border-radius: 24px; }
  .ch-active-search .ch-title { font-size: clamp(42px, 14vw, 62px); }
  .ch-active-search .ch-search-form { grid-template-columns: 1fr; }
  .ch-active-search .ch-submit { width: 100%; }
  .ch-active-search .ch-summary { align-items: flex-start; flex-direction: column; gap: 8px; }
  .ch-active-search .ch-summary__meta { text-align: left; }
  .ch-active-search .ch-result { grid-template-columns: 1fr; }
  .ch-active-search .ch-result__visual { min-height: 210px; max-height: 250px; }
  .ch-active-search .ch-result__body { padding: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .ch-active-search,
  .ch-active-search *,
  .ch-active-search *::before,
  .ch-active-search *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}
