/* CH Chile Compare (.chc): pick / substitutes / side by side. Tokens come from .chf (search.css). */
.chc a { color: var(--ch-red-dark); text-decoration-thickness: 1px; text-underline-offset: .2em; }
.chc a:hover { color: var(--ch-ink); }
.chc a:focus-visible { outline: 2px solid var(--ch-red); outline-offset: 3px; border-radius: 2px; }
.chc ::selection { background: rgba(169, 59, 44, .22); }

/* Head: Find a Chile's header, with a comparison drawing blended into the paper */
.chc .chf-head { padding-bottom: clamp(1.75rem, 3vw, 2.5rem); }
.chc-head-art { width: clamp(240px, 26vw, 380px); margin-bottom: 0; align-self: center; transform: none; filter: none; }  /* alpha cut-out: art--compare-cutout.webp */
.chc-label { display: block; margin: 0 0 .55rem; font: 500 .8rem/1 var(--ch-font-caps); letter-spacing: .14em; text-transform: uppercase; color: var(--ch-brown); }
.chc-pick { max-width: 34rem; }
.chc-suggest { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 30; max-height: 320px; overflow-y: auto; margin: 0; padding: .35rem 0; list-style: none;
  background: var(--chf-field); border: 1px solid var(--chf-line-strong); border-radius: 4px; box-shadow: 0 18px 36px -20px rgba(20, 17, 13, .5); }
.chc-suggest[hidden] { display: none; }
.chc-suggest a { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: .6rem 1rem; color: var(--ch-ink); text-decoration: none; }
.chc-suggest a:hover, .chc-suggest a:focus-visible { background: rgba(201, 184, 150, .35); color: var(--ch-ink); outline: none; }
.chc-suggest span { font-size: 1.05rem; }
.chc-suggest em { flex: none; font-size: .85rem; color: var(--ch-brown); }

.chc-body { display: flex; flex-direction: column; gap: clamp(2.5rem, 5vw, 3.5rem); padding-block: clamp(2rem, 4vw, 3rem) clamp(3rem, 6vw, 5rem); }
.chc-body > [hidden], .chc-body > :empty { display: none; }  /* no gap for hidden or not-yet-rendered blocks */

/* Empty state: familiar starting points */
.chc-start h2 { margin: 0 0 1rem; font: 700 clamp(1.4rem, 2.4vw, 1.75rem)/1.15 var(--ch-font-display); color: var(--ch-ink); }
.chc-start ul { display: flex; flex-wrap: wrap; gap: .55rem; margin: 0; padding: 0; list-style: none; }
.chc-start a { display: inline-block; padding: .55rem 1rem .6rem; background: var(--chf-card); border: 1px solid var(--chf-line-strong); border-radius: 999px;
  font-size: 1.05rem; color: var(--ch-ink); text-decoration: none; transition: border-color .2s, transform .35s var(--chf-ease); }
.chc-start a:hover { border-color: var(--ch-ink); transform: translateY(-1px); }

.chc-note { margin: 0; max-width: 60ch; font-size: 1.08rem; font-style: italic; color: var(--ch-brown); }

.chc-section-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .6rem 1rem; margin-bottom: 1.4rem; padding-bottom: .8rem; border-bottom: 2px solid var(--ch-ink); }
.chc-section-head h2 { margin: 0; font: 700 clamp(1.65rem, 3vw, 2.15rem)/1.1 var(--ch-font-display); color: var(--ch-ink); }
.chc-section-link { margin-left: auto; font: 500 .8rem/1 var(--ch-font-caps); letter-spacing: .12em; text-transform: uppercase; }

/* Heat meter (same as the catalog) */
.chc-meter { display: inline-flex; gap: 2px; }
.chc-meter i { width: 7px; height: 13px; border-radius: 1px; background: rgba(35, 32, 26, .12); }
.chc-meter i.on { background: var(--t); }

/* Substitute cards: the whole card picks the comparison */
.chc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1.25rem; }
.chc-card { display: flex; flex-direction: column; overflow: hidden; background: var(--chf-card); border: 1px solid var(--chf-line); border-radius: 4px; color: inherit; text-decoration: none;
  transition: border-color .2s, box-shadow .45s var(--chf-ease), transform .45s var(--chf-ease); }
.chc-card:hover { color: inherit; border-color: var(--chf-line-strong); box-shadow: 0 14px 28px -18px rgba(35, 32, 26, .45); transform: translateY(-2px); }
.chc-card.is-active { border-color: var(--ch-red); box-shadow: 0 0 0 1px var(--ch-red); }
.chc-card-art { display: block; aspect-ratio: 4 / 5; overflow: hidden; }
.chc-card-img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
.chc-card-img.is-placeholder, .chc-side-img.is-placeholder { opacity: .22; mix-blend-mode: multiply; filter: grayscale(.5); }
.chc-card-body { display: flex; flex: 1; flex-direction: column; gap: .5rem; padding: .9rem 1rem 1rem; border-top: 1px dashed var(--chf-line-strong); }
.chc-card-name { font: 700 1.22rem/1.15 var(--ch-font-display); color: var(--ch-ink); }
.chc-card:hover .chc-card-name { color: var(--ch-red-dark); }
.chc-card-heat { display: flex; align-items: center; gap: .5rem; font: 600 .76rem/1 var(--ch-font-caps); letter-spacing: .1em; text-transform: uppercase; }
.chc-why { font-size: .88rem; line-height: 1.4; color: var(--ch-brown); }
.chc-card-cta { margin-top: auto; padding-top: .3rem; font: 500 .76rem/1 var(--ch-font-caps); letter-spacing: .12em; text-transform: uppercase; color: var(--ch-red-dark); }
.chc-card.is-active .chc-card-cta { color: var(--ch-ink); }

/* Side by side */
.chc-duel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1rem, 3vw, 2.5rem); }
.chc-side { display: grid; grid-template-columns: minmax(96px, 150px) minmax(0, 1fr); grid-template-rows: auto auto 1fr; column-gap: 1.1rem; align-items: start; }
.chc-side-art { grid-row: 1 / 4; display: block; aspect-ratio: 4 / 5; overflow: hidden; background: var(--chf-card); border: 1px solid var(--chf-line); border-radius: 4px; }
.chc-side-img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
.chc-side h3 { margin: .1rem 0 0; font: 700 clamp(1.35rem, 2.4vw, 1.9rem)/1.05 var(--ch-font-display); }
.chc-side h3 a { color: var(--ch-ink); text-decoration: none; }
.chc-side h3 a:hover { color: var(--ch-red-dark); }
.chc-side-sp { margin: .35rem 0 0; color: var(--ch-brown); }
.chc-side-heat { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .6rem; margin: .8rem 0 0; }
.chc-side-heat .chc-meter i { width: 10px; height: 18px; border-radius: 2px; }
.chc-side-heatname { font: 600 .95rem/1 var(--ch-font-caps); letter-spacing: .1em; text-transform: uppercase; }
.chc-side-shu { flex-basis: 100%; font-size: .98rem; color: var(--ch-brown); font-variant-numeric: tabular-nums; }

.chc-swap { margin: clamp(1.5rem, 3vw, 2rem) 0 0; padding: 1.2rem 1.4rem 1.25rem; background: var(--chf-card); border: 1px solid var(--chf-line-strong); border-radius: 4px; }
.chc-swap-head { margin: 0; font: 700 clamp(1.5rem, 2.8vw, 2rem)/1.1 var(--ch-font-display); color: var(--ch-red-dark); }
.chc-swap-detail { margin: .45rem 0 0; max-width: 65ch; font-size: 1.05rem; line-height: 1.5; }

.chc-rows { margin: clamp(1.5rem, 3vw, 2rem) 0 0; }
.chc-row { display: grid; grid-template-columns: 8.5rem repeat(2, minmax(0, 1fr)); column-gap: clamp(1rem, 3vw, 2.5rem); padding: 1rem 0 1.05rem; border-bottom: 1px dashed var(--chf-line-strong); }
.chc-row dt { padding-top: .2rem; font: 600 .8rem/1.2 var(--ch-font-caps); letter-spacing: .12em; text-transform: uppercase; color: var(--ch-brown); }
.chc-row dd { margin: 0; font-size: 1.04rem; line-height: 1.45; }
.chc-flavors { display: flex; flex-wrap: wrap; gap: .35rem; margin: 0; padding: 0; list-style: none; }
.chc-flavors li { padding: .2rem .62rem .24rem; border: 1px solid var(--chf-line-strong); border-radius: 999px; font-size: .9rem; line-height: 1.1; }
.chc-flavors li.is-shared { background: var(--ch-tan); border-color: var(--ch-tan); }
.chc-none { font-style: italic; color: var(--ch-brown); }

@media (max-width: 760px) {
  .chc-head-art { width: 150px; right: -20px; top: 1rem; opacity: .95; }
  /* Keep the pair side by side so the value columns below stay attached to their chile. */
  .chc-duel { gap: .75rem; }
  .chc-side { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; }
  .chc-side-art { grid-row: auto; margin-bottom: .7rem; }
  .chc-side h3 { font-size: 1.2rem; }
  .chc-side-sp { font-size: .9rem; }
  .chc-row { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: .5rem; }
  .chc-row dt { grid-column: 1 / -1; }
  .chc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
  .chc-card-body { padding: .7rem .75rem .8rem; }
  .chc-card-name { font-size: 1.05rem; }
}
