/* Concept 18: side by side. */

.cp {
  --cp-ink: hsl(var(--foreground)); --cp-mute: hsl(var(--muted-foreground)); --cp-line: hsl(var(--border));
  --cp-brass: var(--mf-brass, #a88f5c); --cp-k: 168px; --cp-col: 230px;
  position: fixed; inset: 0; z-index: 80; display: flex; flex-direction: column;
  background: hsl(var(--background)); color: var(--cp-ink);
  animation: cp-in 0.28s ease-out;
}
.cp[hidden] { display: none; }
@keyframes cp-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .cp { animation: none; } }

.cp-top {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 24px;
  padding: 28px clamp(16px, 5vw, 96px) 20px; border-bottom: 1px solid var(--cp-ink);
}
.cp-eyebrow {
  display: flex; align-items: center; gap: 12px; margin: 0 0 10px;
  font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--cp-brass);
}
.cp-eyebrow::before { content: ""; width: 32px; height: 1px; background: currentColor; }
.cp h2 { margin: 0; font-family: var(--mf-serif, serif); font-weight: 500; font-size: clamp(30px, 3.2vw, 44px); line-height: 1.05; }
.cp-sub { margin: 8px 0 0; font-size: 13px; color: var(--cp-mute); }
.cp-tools { display: flex; align-items: center; gap: 22px; flex-shrink: 0; }
.cp-diff { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--cp-mute); cursor: pointer; white-space: nowrap; }
.cp-diff input { width: 15px; height: 15px; margin: 0; accent-color: hsl(var(--foreground)); }
.cp-close {
  padding: 9px 14px; font: inherit; font-size: 13px; color: var(--cp-ink); background: none;
  border: 1px solid var(--cp-line); cursor: pointer; white-space: nowrap;
}
.cp-close:hover { border-color: var(--cp-ink); }
.cp-close span { margin-left: 6px; font-size: 16px; line-height: 1; }

.cp-scroll { flex: 1; overflow: auto; padding: 0 clamp(16px, 5vw, 96px); overscroll-behavior: contain; }
.cp-table {
  border-collapse: separate; border-spacing: 0; table-layout: fixed;
  width: max(100%, calc(var(--cp-k) + var(--cp-cols, 2) * var(--cp-col)));
}
.cp-table col, .cp-table th, .cp-table td { text-align: left; vertical-align: top; }
.cp-k {
  position: sticky; left: 0; z-index: 1; width: var(--cp-k); padding: 14px 16px 14px 0;
  background: hsl(var(--background));
  font-size: 10.5px; font-weight: 400; letter-spacing: 0.16em; text-transform: uppercase; color: var(--cp-mute);
}
.cp-table td, .cp-table thead th { padding: 14px 20px 14px 0; border-bottom: 1px solid var(--cp-line); font-size: 15px; }
.cp-table tbody th.cp-k { border-bottom: 1px solid var(--cp-line); }
.cp-table thead th, .cp-table thead td { position: sticky; top: 0; z-index: 2; background: hsl(var(--background)); padding-top: 22px; border-bottom: 1px solid var(--cp-ink); }
.cp-table thead td.cp-k { z-index: 3; }

.cp-v { display: flex; flex-direction: column; gap: 4px; }
.cp-art { height: 58px; margin-bottom: 8px; color: var(--cp-ink); opacity: 0.85; }
.cp-art svg { height: 100%; width: auto; max-width: 100%; }
.cp-ref { font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--cp-brass); }
.cp-type { font-family: var(--mf-serif, serif); font-size: 21px; font-weight: 500; line-height: 1.15; color: var(--cp-ink); text-decoration: none; }
.cp-type:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.cp-type .cp-num { font-family: "DM Sans", system-ui, sans-serif; font-weight: 300; font-size: 0.86em; }
.cp-x { align-self: flex-start; margin-top: 6px; padding: 0; font: inherit; font-size: 11.5px; color: var(--cp-mute); background: none; border: 0; border-bottom: 1px solid transparent; cursor: pointer; }
.cp-x:hover { color: var(--cp-ink); border-bottom-color: currentColor; }

.cp-price td { font-size: 22px; font-weight: 300; letter-spacing: -0.01em; }
.cp-num { font-variant-numeric: tabular-nums; }
.cp-mark {
  display: block; width: max-content; margin-top: 6px; font-style: normal; font-size: 10px; font-weight: 400;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--cp-brass);
}
.cp-mark::before { content: "● "; font-size: 8px; vertical-align: 1px; }
.cp-none { color: var(--cp-mute); }
.cp-same td { color: var(--cp-mute); }
.cp-only-diff .cp-same { display: none; }
.cp-rest td { font-size: 13px; color: var(--cp-mute); }

.cp-foot {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px;
  padding: 18px clamp(16px, 5vw, 96px); border-top: 1px solid var(--cp-line); background: hsl(var(--background));
}
.cp-go {
  display: inline-flex; gap: 8px; padding: 13px 22px; font-size: 14px; letter-spacing: 0.03em; text-decoration: none;
  color: hsl(var(--background)); background: var(--cp-ink); transition: opacity 0.2s;
}
.cp-go:hover { opacity: 0.88; }
.cp-go i { font-style: normal; }
.cp-copy { padding: 6px 0; font: inherit; font-size: 13px; color: var(--cp-ink); background: none; border: 0; border-bottom: 1px solid var(--cp-line); cursor: pointer; }
.cp-copy:hover { border-bottom-color: var(--cp-ink); }
.cp-note { flex-basis: 100%; margin: 0; font-size: 11.5px; color: var(--cp-mute); overflow-wrap: anywhere; }
.cp a:focus-visible, .cp button:focus-visible, .cp-scroll:focus-visible, .cp-diff input:focus-visible { outline: 1px solid var(--cp-ink); outline-offset: 3px; }

/* Entry points */
.cp-bar {
  font-size: 14px; letter-spacing: 0.025em; padding: 10px 14px; margin-right: -12px;
  color: hsl(var(--primary-foreground)); background: transparent; border: 1px solid hsl(var(--primary-foreground) / 0.3);
  cursor: pointer; transition: border-color 0.2s;
}
.cp-bar:hover { border-color: hsl(var(--primary-foreground)); }
.yd-cmp {
  display: inline-flex; margin: 16px 0 0 14px; padding: 12px 4px; font: inherit; font-size: 13.5px; color: hsl(var(--foreground));
  background: none; border: 0; border-bottom: 1px solid hsl(var(--border)); cursor: pointer;
}
.yd-cmp:hover { border-bottom-color: hsl(var(--foreground)); }

@media (max-width: 720px) {
  .cp { --cp-k: 96px; --cp-col: 172px; }
  .cp-top { flex-direction: column; align-items: stretch; gap: 14px; padding-top: 20px; }
  .cp-tools { justify-content: space-between; }
  .cp-table td, .cp-table thead th { font-size: 14px; padding-right: 14px; }
  .cp-price td { font-size: 18px; }
  .cp-type { font-size: 18px; }
  .cp-art { height: 44px; }
  .cp-go { flex: 1; justify-content: center; }
  .yd-cmp { margin-left: 0; }
}
@media print { .cp { display: none !important; } }
