/* calico comparison page: one page, eight panels, one shown at a time. Colours only through the
   site variables. Everything that moves is inside the no-preference block at the foot. With no
   script the tabs are plain links down to each panel and all eight are stacked and readable. */
.cmp { padding: clamp(8px, 2vw, 20px) 0 clamp(40px, 8vw, 80px); }
.cmp h1 { font-size: clamp(2.4rem, 8.6vw, 4.2rem); line-height: 1.04; letter-spacing: -0.025em; margin: 0; text-wrap: balance; max-width: 16ch; }
.cmp-lede { font-size: clamp(1.05rem, 2.4vw, 1.2rem); line-height: 1.55; color: var(--ink-secondary); max-width: 38rem; margin: 1.2rem 0 0; }

.cmp-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2rem; }
.cmp-tabs a { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 18px 0 14px; border-radius: 999px; background: var(--raised); color: var(--ink);
  font-weight: 600; font-size: 1rem; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.cmp-tabs a::before { content: ""; width: 14px; height: 14px; border-radius: 50%; background: var(--c); flex: none; }
.cmp-tabs a:hover { background: var(--tint); }
.cmp-tabs a[aria-selected="true"] { background: var(--button); color: var(--on-button); }

.cmp-stage { display: grid; gap: 14px; margin-top: 18px; }
.cmp-panel { background: var(--raised); border-radius: 32px; padding: clamp(22px, 5vw, 40px); scroll-margin-top: 88px; }
.cmp-panel header { display: flex; align-items: center; gap: 16px; }
.cmp-panel header i { flex: none; width: 54px; height: 54px; border-radius: 50%; background: var(--c); }
.cmp-panel h2 { font-size: clamp(1.7rem, 5vw, 2.4rem); line-height: 1.1; letter-spacing: -0.015em; }
.cmp-panel header p { margin: 4px 0 0; color: var(--ink-secondary); font-size: 1rem; }
.cmp-panel dl { margin: 1.6rem 0 0; display: grid; gap: 4px; }
.cmp-panel .r { display: grid; gap: 4px; padding: 16px 0; border-top: 1px solid var(--rule); }
.cmp-panel dt { font-size: 0.9rem; font-weight: 700; color: var(--seal); }
.cmp-panel dd { margin: 0; font-size: clamp(1.05rem, 2.4vw, 1.2rem); line-height: 1.5; max-width: 42rem; }
.cmp-panel .us { position: relative; }
.cmp-panel .us::before { content: ""; position: absolute; left: -18px; top: 16px; bottom: 16px; width: 4px; border-radius: 2px; background: var(--ginger); }
.cmp-panel .pick { background: var(--page); border-radius: 20px; border-top: 0; padding: 16px 20px 18px; margin: 10px -16px 0; }

/* with script: one panel at a time */
.cmp-js .cmp-panel[hidden] { display: none; }
.cmp-next { margin: 4px 0 0; }
.cmp-next a { display: inline-flex; align-items: center; min-height: 48px; font-weight: 700; color: var(--seal); text-decoration: none; }
.cmp-next a::after { content: ""; width: 9px; height: 9px; margin-left: 10px; border-right: 2.4px solid currentColor; border-top: 2.4px solid currentColor; transform: rotate(45deg); }
.cmp-note { margin: clamp(28px, 5vw, 44px) 0 0; max-width: 40rem; color: var(--ink-secondary); font-size: 0.98rem; line-height: 1.55; }
.cmp-note a { color: var(--seal); }

@media (min-width: 760px) {
  .cmp-panel .r { grid-template-columns: 13rem 1fr; gap: 24px; align-items: baseline; }
  .cmp-panel .pick { grid-template-columns: 13rem 1fr; }
}

@media (prefers-reduced-motion: no-preference) {
  .cmp-js .cmp-panel.enter header i { animation: cmp-pop 0.5s cubic-bezier(0.23, 1, 0.32, 1) both; }
  .cmp-js .cmp-panel.enter h2, .cmp-js .cmp-panel.enter header p { animation: cmp-rise 0.45s cubic-bezier(0.23, 1, 0.32, 1) both; }
  .cmp-js .cmp-panel.enter .r { animation: cmp-rise 0.5s cubic-bezier(0.23, 1, 0.32, 1) both; }
  .cmp-js .cmp-panel.enter .r:nth-child(1) { animation-delay: 0.06s; }
  .cmp-js .cmp-panel.enter .r:nth-child(2) { animation-delay: 0.13s; }
  .cmp-js .cmp-panel.enter .r:nth-child(3) { animation-delay: 0.2s; }
  .cmp-js .cmp-panel.enter .r:nth-child(4) { animation-delay: 0.3s; }
  .cmp-tabs a { transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease; }
  .cmp-tabs a:active { transform: scale(0.97); }
  .cmp-tabs a::before { transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1); }
  .cmp-tabs a[aria-selected="true"]::before { transform: scale(1.25); }
}
@keyframes cmp-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes cmp-pop { from { opacity: 0; transform: scale(0.6); } to { opacity: 1; transform: none; } }
