/* Side-by-side comparison (pilot). Only loaded on pages that offer it.
   The line-length rule does not apply here: columns are narrower by design. */
.cmp-lock { overflow: hidden; }
.cmp { position: fixed; inset: 0; z-index: 60; overflow: auto; background: var(--bg); color: var(--fg); }
.cmp[hidden] { display: none; }
.cmp-bar { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: .75rem; padding: .6rem 1rem .6rem 1.25rem; background: var(--bg); border-bottom: 1px solid var(--rule); }
.cmp-bar h2 { flex: 1; margin: 0; font-size: 1.05rem; font-family: var(--serif); }
.cmp-x { width: 2.5rem; height: 2.5rem; border: 0; background: transparent; color: var(--muted); font-size: 1.6rem; cursor: pointer; border-radius: 6px; }
.cmp-x:hover { background: var(--rule); color: var(--fg); }

.cmp-pick { max-width: 56rem; margin: 1rem auto 0; padding: 0 1.25rem; font-family: var(--sans); font-size: 15px; }
.cmp-pick fieldset { border: 1px solid var(--rule); border-radius: 8px; padding: .6rem 1rem .9rem; margin: 0 0 .8rem; }
.cmp-pick legend { padding: 0 .4rem; color: var(--muted); }
.cmp-opt { display: flex; align-items: center; gap: .5rem; min-height: 2.4rem; }
.cmp-opt input { width: 1.15rem; height: 1.15rem; accent-color: var(--accent); }
.cmp-pick .btn[disabled] { opacity: .5; cursor: not-allowed; }
.cmp-hint, .cmp-status { font-family: var(--sans); font-size: 14px; color: var(--muted); display: inline-block; margin: 0 0 0 .8rem; }
.cmp-status { margin: 1.5rem 1.25rem; }

.cmp-out { padding: .5rem 1.25rem 4rem; max-width: 96rem; margin: 0 auto; }
.cmp-out:focus { outline: none; }
.cmp-intro { display: none; font-family: var(--sans); font-size: 14px; color: var(--muted); }

/* One grid per row keeps every § level across the columns; the page scrolls them together. */
.cmp-heads, .cmp-row, .cmp-foot { display: grid; grid-template-columns: 3.2rem repeat(var(--cols), minmax(0, 1fr)); column-gap: 1.4rem; }
.cmp-heads { position: sticky; top: 3.55rem; z-index: 2; background: var(--bg); padding: .7rem 0 .5rem; border-bottom: 1px solid var(--rule); }
.cmp-head h3, .cmp-credit h3 { margin: 0; font-family: var(--serif); font-size: 1.05rem; line-height: 1.25; }
.cmp-by, .cmp-approx { margin: .15rem 0 0; font-family: var(--sans); font-size: 13px; color: var(--muted); line-height: 1.35; }
.cmp-approx { color: var(--accent); }
.cmp-row { padding: .9rem 0; border-bottom: 1px solid var(--rule); }
.cmp-n { font-family: var(--sans); font-size: 12.5px; color: var(--faint); font-variant-numeric: tabular-nums; padding-top: .35rem; }
.cmp-cell { min-width: 0; font-size: .86em; line-height: 1.55; overflow-wrap: break-word; }
.cmp-cell p { margin: 0 0 .7em; }
.cmp-cell p:last-child { margin-bottom: 0; }
.cmp-cell blockquote { margin: .8em 0; padding-left: .9em; border-left: 2px solid var(--rule); }
.cmp-cell h2 { font-family: var(--sans); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 .6em; }
.cmp-cell-h { display: none; }
.cmp-gap { color: var(--faint); font-family: var(--sans); font-size: 13px; font-style: italic; }
.cmp-more { display: none; }
.cmp .note-pop { max-width: none; }
.cmp-foot { padding-top: 1.2rem; }
.cmp-credit p { margin: .3rem 0 0; font-family: var(--sans); font-size: 12.5px; line-height: 1.45; color: var(--faint); }
.cmp-credit h3 { font-size: .95rem; }

/* Phones: one column. Tapping a § shows the same passage in the other translations. */
@media (max-width: 48rem) {
  .cmp-out { padding-inline: 1rem; }
  .cmp-intro { display: block; margin: .6rem 0 0; }
  .cmp-heads { display: none; }
  .cmp-row { display: block; position: relative; padding: .8rem 0; }
  .cmp-n { display: block; padding: 0 0 .25rem; }
  .cmp-cell { font-size: .95em; }
  .cmp-row .cmp-cell:not(.is-primary) { display: none; }
  .cmp-row.open .cmp-cell:not(.is-primary) { display: block; margin-top: .9rem; padding-top: .8rem; border-top: 1px dashed var(--rule); }
  .cmp-cell-h { display: block; margin: 0 0 .3rem; font-family: var(--sans); font-size: 12.5px; font-weight: 600; color: var(--accent); }
  .cmp-more { display: inline-flex; align-items: center; min-height: 2.75rem; margin-top: .5rem; padding: .3rem .9rem; border: 1px solid var(--rule); border-radius: 8px; background: var(--surface); color: var(--fg); font: 600 14px var(--sans); cursor: pointer; }
  .cmp-row.open .cmp-more { margin-bottom: 0; }
  .cmp-foot { display: block; }
  .cmp-credit { margin-top: .9rem; }
}
