/*
 * Campaign Intelligence feature page (site/features/intelligence.blade.php).
 * Builds on wa.css; every class here is prefixed kf-ci-.
 */

/* ---------- Hero dashboard ---------- */
.kf-ci-hero { position: relative; padding: 24px 0 40px; }
.kf-ci-dash { position: relative; z-index: 1; max-width: 520px; margin: 0 auto; background: #fff; box-shadow: 0 40px 80px -30px rgba(7, 94, 84, .45), 0 18px 36px rgba(11, 31, 26, .1); }
.kf-ci-dash-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 16px; background: var(--ks-soft); }
.kf-ci-dash-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.kf-ci-camps { display: flex; gap: 6px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.kf-ci-camps::-webkit-scrollbar { display: none; }
.kf-ci-camp { flex: none; height: 34px; padding: 0 12px; border: 1px solid var(--ks-line); border-radius: 999px; background: #fff; color: var(--ks-text); font: 600 12.5px/1 var(--ks-font); white-space: nowrap; cursor: pointer; transition: background .2s, border-color .2s, color .2s; }
.kf-ci-camp:hover { border-color: #9fdcc4; }
.kf-ci-camp[aria-pressed="true"] { border-color: var(--kh-wa-dark); background: var(--kh-wa-dark); color: #fff; }
.kf-ci-trend { flex: none; display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; border-radius: 999px; background: #dcfce7; color: #15803d; font-size: 12px; font-weight: 700; white-space: nowrap; }
.kf-ci-trend i { font-size: 15px; }
.kf-ci-trend.is-flat { background: #e0f2fe; color: #0369a1; }
.kf-ci-trend.is-down { background: #ffe4e6; color: #be123c; }

.kf-ci-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0; }
.kf-ci-kpi { min-width: 0; padding: 10px; border: 1px solid var(--ks-line); border-radius: 12px; background: #fff; }
.kf-ci-kpi dt { display: flex; align-items: center; gap: 4px; overflow: hidden; color: var(--ks-muted); font-size: 11.5px; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.kf-ci-kpi dt i { flex: none; font-size: 14px; color: var(--kh-wa-teal); }
.kf-ci-kpi dd { margin: 4px 0 0; }
.kf-ci-kpi dd span { display: block; color: var(--ks-ink); font-size: 1.2rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kf-ci-kpi dd b { display: block; height: 4px; margin-top: 6px; overflow: hidden; border-radius: 999px; background: #e3eee9; }
.kf-ci-kpi dd b i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--kh-wa-teal), var(--kh-wa)); transition: width .6s ease; }

.kf-ci-chart { padding: 12px; border: 1px solid var(--ks-line); border-radius: 14px; background: #fff; }
.kf-ci-chart-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; color: var(--ks-ink); font-size: 13px; }
.kf-ci-legend { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; color: var(--ks-muted); font-size: 12px; }
.kf-ci-legend i { width: 10px; height: 10px; margin-left: 6px; border-radius: 3px; }
.kf-ci-legend i:first-child { margin-left: 0; }
.kf-ci-legend .is-sent { background: #b9e9d3; }
.kf-ci-legend .is-open { background: var(--kh-wa-teal); }
.kf-ci-legend .is-del { background: var(--kh-wa-dark); }
.kf-ci-legend .is-click { background: var(--kh-tick); }
.kf-ci-bars { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; align-items: end; height: 120px; margin-top: 12px; }
.kf-ci-col { position: relative; height: 100%; }
.kf-ci-col i, .kf-ci-col b { position: absolute; bottom: 0; left: 0; right: 0; border-radius: 5px 5px 2px 2px; transform-origin: 50% 100%; transition: height .6s cubic-bezier(.2, .8, .2, 1); animation: kf-ci-grow .8s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 40ms); }
.kf-ci-col i { height: var(--s); background: #c9eedc; }
.kf-ci-col b { left: 22%; right: 22%; height: var(--o); background: linear-gradient(180deg, var(--kh-wa), var(--kh-wa-teal)); }
.kf-ci-axis { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; margin-top: 6px; color: var(--ks-muted); font-size: 10.5px; white-space: nowrap; }

.kf-ci-rec { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid #c9eedb; border-radius: 12px; background: linear-gradient(135deg, #ecfdf3, #f0fdfa); }
.kf-ci-rec.is-swap .kf-ci-rec-copy, .kf-ci-rec.is-swap .kf-ci-rec-icon { animation: kh-panel-in .4s ease both; }
.kf-ci-rec-icon { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--kh-wa-teal); color: #fff; font-size: 18px; }
.kf-ci-rec-copy { min-width: 0; line-height: 1.35; }
.kf-ci-rec-copy strong { display: block; color: var(--ks-ink); font-size: 13.5px; }
.kf-ci-rec-copy small { display: block; color: var(--ks-muted); font-size: 12.5px; }

.kf-ci-float-ab { top: -38px; right: -5%; animation-delay: -2s; }
.kf-ci-float-time { bottom: -30px; left: -7%; animation-delay: -4s; }

@keyframes kf-ci-grow { from { transform: scaleY(0); } }
@keyframes kf-ci-fill { from { width: 0; } }
@keyframes kf-ci-reveal { from { clip-path: inset(0 100% 0 0); } }

/* ---------- Insight tabs ---------- */
.kf-ci-win { background: #fff; box-shadow: var(--ks-shadow-lg); }
.kf-ci-sample { margin: 0; padding: 0 16px 14px; color: var(--ks-muted); font-size: 12.5px; text-align: center; }

.kf-ci-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 16px; }
.kf-ci-tile { --tone: var(--kh-wa-teal); --soft: #dcf5ea; min-width: 0; padding: 12px; border: 1px solid var(--ks-line); border-radius: 14px; background: #fff; }
.kf-ci-tile.is-green { --tone: #16a34a; --soft: #dcfce7; }
.kf-ci-tile.is-blue { --tone: #2563eb; --soft: #dbeafe; }
.kf-ci-tile.is-amber { --tone: #d97706; --soft: #fef3c7; }
.kf-ci-tile.is-rose { --tone: #e11d48; --soft: #ffe4e6; }
.kf-ci-tile-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--soft); color: var(--tone); font-size: 16px; }
.kf-ci-tile small { display: block; margin-top: 8px; overflow: hidden; color: var(--ks-muted); font-size: 12px; white-space: nowrap; text-overflow: ellipsis; }
.kf-ci-tile strong { display: block; color: var(--ks-ink); font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kf-ci-tile b { display: block; height: 4px; margin-top: 8px; overflow: hidden; border-radius: 999px; background: #eef3f1; }
.kf-ci-tile b i { display: block; height: 100%; border-radius: inherit; background: var(--tone); }
.kh-panel:not([hidden]) .kf-ci-tile b i { animation: kf-ci-fill 1s ease both; }

.kf-ci-hbars { display: grid; gap: 12px; padding: 16px; }
.kf-ci-hbar { --tone: var(--kh-wa-teal); display: grid; gap: 8px; padding: 12px 14px; border: 1px solid var(--ks-line); border-radius: 14px; background: #fff; }
.kf-ci-hbar.is-wa { --tone: #1faa59; }
.kf-ci-hbar.is-sms { --tone: #2563eb; }
.kf-ci-hbar.is-mail { --tone: #ea580c; }
.kf-ci-hbar-name { display: flex; align-items: center; gap: 6px; color: var(--ks-ink); font-size: 14px; font-weight: 700; }
.kf-ci-hbar-name i { font-size: 18px; color: var(--tone); }
.kf-ci-hbar-row { display: grid; grid-template-columns: 60px minmax(0, 1fr) 48px; align-items: center; gap: 10px; font-size: 12.5px; }
.kf-ci-hbar-row em { color: var(--ks-muted); font-style: normal; }
.kf-ci-hbar-row b { height: 8px; overflow: hidden; border-radius: 999px; background: #eef3f1; }
.kf-ci-hbar-row b i { display: block; height: 100%; border-radius: inherit; background: var(--tone); }
.kf-ci-hbar-row.is-open b i { opacity: .5; }
.kf-ci-hbar-row strong { color: var(--ks-ink); text-align: right; font-variant-numeric: tabular-nums; }
.kh-panel:not([hidden]) .kf-ci-hbar-row b i { animation: kf-ci-fill 1s ease both; }

.kf-ci-line-wrap { padding: 16px 16px 8px; }
.kf-ci-line { display: block; width: 100%; height: 200px; margin-top: 10px; overflow: visible; }
.kh-panel:not([hidden]) .kf-ci-line { animation: kf-ci-reveal 1.4s ease both; }
.kf-ci-gridlines line { stroke: #e6efeb; stroke-width: 1; vector-effect: non-scaling-stroke; }
.kf-ci-area.is-sent { fill: rgba(18, 140, 126, .1); }
.kf-ci-area.is-open { fill: rgba(37, 211, 102, .2); }
.kf-ci-stroke { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.kf-ci-stroke.is-sent { stroke: var(--kh-wa-teal); }
.kf-ci-stroke.is-open { stroke: #16a34a; }
.kf-ci-line-wrap .kf-ci-legend .is-open { background: #16a34a; }
.kf-ci-line-wrap .kf-ci-legend .is-sent { background: var(--kh-wa-teal); }
.kf-ci-line-axis { display: flex; justify-content: space-between; margin-top: 6px; color: var(--ks-muted); font-size: 11px; }

.kf-ci-recs { display: grid; gap: 10px; padding: 16px; }
.kf-ci-recrow { --tone: var(--kh-wa-teal); --soft: #dcf5ea; display: flex; align-items: flex-start; gap: 12px; padding: 12px; border: 1px solid var(--ks-line); border-radius: 14px; background: #fff; }
.kf-ci-recrow.is-amber { --tone: #d97706; --soft: #fef3c7; }
.kf-ci-recrow.is-blue { --tone: #0284c7; --soft: #e0f2fe; }
.kf-ci-recrow.is-green { --tone: #16a34a; --soft: #dcfce7; }
.kf-ci-recrow > i { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--soft); color: var(--tone); font-size: 18px; }
.kf-ci-recrow > span { min-width: 0; line-height: 1.4; }
.kf-ci-recrow strong { display: block; color: var(--ks-ink); font-size: 14px; }
.kf-ci-recrow small { display: block; color: var(--ks-muted); font-size: 13px; }
.kh-panel:not([hidden]) .kf-ci-recrow { animation: kh-pop .4s cubic-bezier(.2, .9, .3, 1.2) both; }
.kh-panel:not([hidden]) .kf-ci-recrow:nth-child(2) { animation-delay: .1s; }
.kh-panel:not([hidden]) .kf-ci-recrow:nth-child(3) { animation-delay: .2s; }
.kh-panel:not([hidden]) .kf-ci-recrow:nth-child(4) { animation-delay: .3s; }

/* ---------- A/B simulator ---------- */
.kf-ci-ab { align-items: start; }
.kf-ci-ab-controls, .kf-ci-ab-result { min-width: 0; }
.kf-ci-ab .kh-seg { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; }
.kf-ci-ab .kh-seg button { min-width: 0; padding: 0 8px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.kf-ci-range { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 6px 14px; margin-bottom: 14px; }
.kf-ci-range label { color: var(--ks-ink); font-size: 14px; font-weight: 600; }
.kf-ci-range input { width: 100%; min-width: 0; accent-color: var(--kh-wa-teal); }
.kf-ci-range output { grid-column: 1 / -1; color: var(--ks-muted); font-size: 13.5px; }
.kf-ci-run { margin-top: 26px; }
.kf-ci-ab-result .kh-builder-window { background: var(--ks-soft); }
.kf-ci-ab-body { display: grid; gap: 14px; padding: 20px; }
.kf-ci-ab-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; color: var(--ks-muted); font-size: 13px; }
.kf-ci-ab-meta > span { display: inline-flex; align-items: center; gap: 6px; }
.kf-ci-ab-meta i { font-size: 17px; color: var(--kh-wa-teal); }
.kf-ci-ab-meta b { color: var(--ks-ink); font-variant-numeric: tabular-nums; }
.kf-ci-variant { padding: 14px 16px; border: 1px solid var(--ks-line); border-radius: 16px; background: #fff; transition: border-color .3s, box-shadow .3s; }
.kf-ci-variant-head { display: flex; align-items: flex-start; gap: 12px; }
.kf-ci-variant-head p { flex: 1; min-width: 0; margin: 0; color: var(--ks-ink); font-size: 14.5px; line-height: 1.45; }
.kf-ci-letter { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--ks-primary-50); color: var(--ks-primary-700); font-weight: 800; transition: background .3s, color .3s; }
.kf-ci-win-badge { flex: none; display: none; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; background: #dcfce7; color: #15803d; font-size: 12px; font-weight: 700; }
.kf-ci-win-badge i { font-size: 14px; }
.kf-ci-variant.is-winner { border-color: #86d9b4; box-shadow: 0 16px 34px -18px rgba(18, 140, 126, .55); }
.kf-ci-variant.is-winner .kf-ci-letter { background: var(--kh-wa-teal); color: #fff; }
.kf-ci-variant.is-winner .kf-ci-win-badge { display: inline-flex; animation: kh-pop .32s cubic-bezier(.2, .9, .3, 1.2) both; }
.kf-ci-variant-score { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 12px 0 6px; }
.kf-ci-variant-score small { color: var(--ks-muted); font-size: 12.5px; }
.kf-ci-variant-score strong { color: var(--ks-ink); font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kf-ci-meter { height: 8px; overflow: hidden; border-radius: 999px; background: #e3eee9; }
.kf-ci-meter span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--kh-wa-teal), var(--kh-wa)); }
.kf-ci-variant.is-loser .kf-ci-meter span { background: #a3b8b0; }
.kf-ci-verdict { display: flex; align-items: flex-start; gap: 8px; margin: 0; padding: 10px 12px; border: 1px dashed var(--ks-line); border-radius: 12px; background: #fff; color: var(--ks-text); font-size: 13.5px; line-height: 1.45; }
.kf-ci-verdict i { flex: none; font-size: 18px; color: var(--kh-wa-teal); }
.kf-ci-verdict.is-good { border: 1px solid #bbf7d0; background: #f0fdf4; }
.kf-ci-verdict.is-wait { border: 1px solid #fde68a; background: #fffbeb; }
.kf-ci-verdict.is-wait i { color: #d97706; }
.kf-ci-footnote { margin: 12px 0 0; color: var(--ks-muted); font-size: 13px; text-align: center; }
.kf-ci-ab-facts { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 32px; }
.kf-ci-ab-facts span { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--ks-line); border-radius: 999px; background: #fff; color: var(--ks-ink); font-size: 14px; font-weight: 600; }
.kf-ci-ab-facts i { font-size: 18px; color: var(--kh-wa-teal); }

/* ---------- Send time heatmap ---------- */
.kf-ci-heat { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.kf-ci-heat-main, .kf-ci-slot, .kf-ci-best { border: 1px solid rgba(255, 255, 255, .12); border-radius: 22px; background: rgba(255, 255, 255, .05); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.kf-ci-heat-main { min-width: 0; padding: 22px; }
.kf-ci-heat-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.kf-ci-chan { display: inline-flex; padding: 4px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 14px; background: rgba(255, 255, 255, .06); }
.kf-ci-chan button { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border: 0; border-radius: 10px; background: none; color: rgba(255, 255, 255, .78); font: 600 14px/1 var(--ks-font); white-space: nowrap; cursor: pointer; transition: background .2s, color .2s; }
.kf-ci-chan button i { font-size: 17px; }
.kf-ci-chan button:hover { color: #fff; }
.kf-ci-chan button[aria-pressed="true"] { background: var(--kh-wa); color: #0b141a; }
.kf-ci-heat-legend { display: inline-flex; align-items: center; gap: 8px; color: rgba(255, 255, 255, .6); font-size: 12px; }
.kf-ci-heat-legend i { width: 90px; height: 8px; border-radius: 999px; background: linear-gradient(90deg, rgba(37, 211, 102, .1), #25d366); }
.kf-ci-heat-scroll { overflow-x: auto; padding: 4px 4px 8px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .2) transparent; }
.kf-ci-grid { display: grid; grid-template-columns: 34px repeat(24, minmax(12px, 1fr)); gap: 3px; min-width: 480px; }
.kf-ci-hour { padding-bottom: 4px; color: rgba(255, 255, 255, .5); font-size: 10.5px; line-height: 1; text-align: center; }
.kf-ci-day { display: flex; align-items: center; color: rgba(255, 255, 255, .62); font-size: 11.5px; }
.kf-ci-cell { position: relative; width: 100%; min-height: 12px; aspect-ratio: 1; padding: 0; border: 0; border-radius: 4px; background-color: rgba(37, 211, 102, calc(.05 + var(--v, 0) * .95)); cursor: pointer; transition: background-color .5s ease, transform .15s ease, box-shadow .15s ease; }
.kf-ci-cell.is-top { box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .75); }
.kf-ci-cell:hover, .kf-ci-cell.is-active { z-index: 1; transform: scale(1.3); box-shadow: 0 0 0 2px #fff, 0 6px 16px rgba(0, 0, 0, .4); }
.kf-ci-cell:focus-visible { z-index: 1; outline: 2px solid #fff; outline-offset: 1px; }
.kf-ci-heat-hint { display: flex; align-items: center; gap: 6px; margin: 12px 0 0; color: rgba(255, 255, 255, .58); font-size: 12.5px; }
.kf-ci-heat-hint i { font-size: 16px; color: var(--kh-wa); }
.kf-ci-hint-narrow { display: none; }

.kf-ci-heat-side { display: grid; gap: 16px; min-width: 0; }
.kf-ci-slot { padding: 20px; }
.kf-ci-slot small { display: block; color: var(--kh-wa); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.kf-ci-slot strong { display: block; margin-top: 6px; color: #fff; font-size: 1.25rem; line-height: 1.3; }
.kf-ci-slot-score { display: block; margin-top: 4px; color: rgba(255, 255, 255, .7); font-size: 14px; }
.kf-ci-slot-score b { color: #fff; font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.kf-ci-slot em { display: inline-block; margin-top: 12px; padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .1); color: rgba(255, 255, 255, .82); font-size: 12px; font-style: normal; font-weight: 700; }
.kf-ci-slot em.is-top { background: var(--kh-wa); color: #0b141a; }
.kf-ci-slot em.is-good { background: rgba(37, 211, 102, .2); color: #86efac; }
.kf-ci-slot.is-swap strong, .kf-ci-slot.is-swap .kf-ci-slot-score { animation: kh-panel-in .3s ease both; }
.kf-ci-best { padding: 18px 20px; }
.kf-ci-best-title { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; color: #fff; font-size: 14.5px; font-weight: 700; }
.kf-ci-best-title i { font-size: 18px; color: var(--kh-wa); }
.kf-ci-tophours { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.kf-ci-tophours li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: rgba(255, 255, 255, .05); }
.kf-ci-tophours li > span { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--kh-wa); color: #0b141a; font-size: 12px; font-weight: 800; }
.kf-ci-tophours strong { flex: 1; min-width: 0; overflow: hidden; color: #fff; font-size: 14px; white-space: nowrap; text-overflow: ellipsis; }
.kf-ci-tophours em { color: rgba(255, 255, 255, .7); font-size: 13px; font-style: normal; font-variant-numeric: tabular-nums; }
.kf-ci-days { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.kf-ci-days li { display: grid; grid-template-columns: 86px minmax(0, 1fr) 44px; align-items: center; gap: 10px; font-size: 13px; }
.kf-ci-days li > span { overflow: hidden; color: rgba(255, 255, 255, .82); white-space: nowrap; text-overflow: ellipsis; }
.kf-ci-days b { height: 6px; overflow: hidden; border-radius: 999px; background: rgba(255, 255, 255, .08); }
.kf-ci-days b i { display: block; height: 100%; border-radius: inherit; background: var(--kh-wa); transition: width .5s ease; }
.kf-ci-days em { color: rgba(255, 255, 255, .7); font-style: normal; text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Compare ---------- */
.kf-ci-cmp-pick { display: grid; justify-items: center; gap: 12px; margin-bottom: 28px; }
.kf-ci-cmp-pick .kh-chips { justify-content: center; }
.kf-ci-cmp-note { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--ks-muted); font-size: 13.5px; }
.kf-ci-cmp-note i { flex: none; font-size: 17px; color: var(--kh-wa-teal); }
.kf-ci-cmp-note.is-warn { color: #b45309; }
.kf-ci-cmp-note.is-warn i { color: #d97706; }
.kf-ci-cmp-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; align-items: stretch; }
.kf-ci-cmp-table { box-shadow: var(--ks-shadow); }
.kf-ci-cmp-table th[scope="col"] { white-space: nowrap; }
.kf-ci-cmp-table tbody th { color: var(--ks-muted); font-size: 14px; font-weight: 600; white-space: nowrap; }
.kf-ci-cmp-table td { font-variant-numeric: tabular-nums; }
.kf-ci-cmp-table td.is-best { color: var(--kh-wa-teal); font-weight: 700; }
.kf-ci-cmp-chart { display: flex; flex-direction: column; min-width: 0; padding: 18px; border: 1px solid var(--ks-line); border-radius: var(--ks-radius, 16px); background: #fff; box-shadow: var(--ks-shadow); }
.kf-ci-groups { flex: 1; display: flex; gap: 14px; min-height: 220px; margin-top: 16px; }
.kf-ci-group { flex: 1 1 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.kf-ci-group[hidden] { display: none !important; }
.kf-ci-group-bars { flex: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 4px; min-height: 160px; border-bottom: 1px solid var(--ks-line); }
.kf-ci-group-bars span { height: var(--h); min-height: 2px; border-radius: 6px 6px 2px 2px; transform-origin: 50% 100%; }
.kf-ci-group-bars .is-del { background: var(--kh-wa-dark); }
.kf-ci-group-bars .is-open { background: var(--kh-wa); }
.kf-ci-group-bars .is-click { background: var(--kh-tick); }
.kf-ci-group:not([hidden]) .kf-ci-group-bars span { animation: kf-ci-grow .6s cubic-bezier(.2, .8, .2, 1) both; }
.kf-ci-group small { overflow: hidden; color: var(--ks-muted); font-size: 12px; text-align: center; white-space: nowrap; text-overflow: ellipsis; }

/* ---------- Cards and FAQ ---------- */
.kf-ci-cardviz { display: flex; align-items: flex-end; gap: 6px; height: 54px; margin-top: 22px; }
.kf-ci-cardviz i { flex: 1; height: var(--h); border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, var(--kh-wa), var(--kh-wa-teal)); opacity: .85; transform-origin: 50% 100%; }
.ks-reveal.is-visible .kf-ci-cardviz i { animation: kf-ci-grow .8s cubic-bezier(.2, .8, .2, 1) both; }
.kf-ci-cardchips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 22px; }
.kf-ci-cardchips b { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 999px; background: var(--ks-soft); color: var(--ks-muted); font-size: 12.5px; font-weight: 600; }
.kf-ci-cardchips b.is-on { background: var(--ks-primary-50); color: var(--ks-primary-700); }
.kf-ci-faq-head { max-width: 860px; margin: 80px auto 20px; text-align: center; }
.kf-ci-faq-head h3 { font-size: 1.4rem; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
    .kf-ci-float-ab { right: -2%; }
    .kf-ci-float-time { left: -3%; }
}
@media (max-width: 960px) {
    .kf-ci-hero { max-width: 560px; margin: 0 auto; }
    .kf-ci-float-ab { right: 0; }
    .kf-ci-float-time { left: 0; }
    .kf-ci-heat, .kf-ci-cmp-grid { grid-template-columns: minmax(0, 1fr); }
    .kf-ci-heat-side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .kf-ci-slot { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
    .kf-ci-hero { padding: 8px 0 24px; }
    .kf-ci-float-ab, .kf-ci-float-time { display: none; }
    .kf-ci-dash-body { gap: 12px; padding: 12px; }
    .kf-ci-dash-top { flex-wrap: wrap; }
    .kf-ci-camps { flex: 1 1 100%; }
    .kf-ci-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .kf-ci-bars { height: 96px; gap: 4px; }
    .kf-ci-axis { gap: 4px; }
    .kf-ci-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 12px; }
    .kf-ci-hbars, .kf-ci-recs { padding: 12px; }
    .kf-ci-hbar-row { grid-template-columns: 52px minmax(0, 1fr) 44px; gap: 8px; }
    .kf-ci-line-wrap { padding: 12px 12px 6px; }
    .kf-ci-line { height: 160px; }
    .kf-ci-ab .kh-seg { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .kf-ci-ab-body { padding: 14px; }
    .kf-ci-variant { padding: 12px; }
    .kf-ci-ab-facts { justify-content: flex-start; }
    .kf-ci-ab-facts span { font-size: 13px; }
    .kf-ci-heat-main { padding: 14px; border-radius: 18px; }
    .kf-ci-heat-side { grid-template-columns: minmax(0, 1fr); }
    .kf-ci-chan { display: flex; width: 100%; }
    .kf-ci-chan button { flex: 1; justify-content: center; min-width: 0; padding: 0 6px; font-size: 13px; }
    .kf-ci-hint-wide { display: none; }
    .kf-ci-hint-narrow { display: inline; }
    .kf-ci-days li { grid-template-columns: 78px minmax(0, 1fr) 40px; }
    .kf-ci-cmp-pick { display: block; justify-items: normal; }
    .kf-ci-cmp-pick .kh-chips { justify-self: stretch; flex-wrap: nowrap; justify-content: flex-start; margin: 0 -18px; padding: 0 18px 6px; overflow-x: auto; scrollbar-width: none; }
    .kf-ci-cmp-pick .kh-chips::-webkit-scrollbar { display: none; }
    .kf-ci-cmp-pick .kh-chip { flex: none; }
    .kf-ci-cmp-note { margin-top: 10px; }
    .kf-ci-cmp-chart { padding: 14px; }
    .kf-ci-groups { gap: 8px; min-height: 180px; }
    .kf-ci-group-bars { min-height: 130px; }
    .kf-ci-faq-head { margin-top: 56px; }
}
