/*
  The "compare" section of a service page (docs/pages/service_pages/sections/compare.py): the usual options, one card each,
  answering the same questions. From 1024 px the cards stand in a row and each card's answers sit on rows shared across the
  three (subgrid; the section sets --rows to the number of questions), so they read like a table. Below 1024 each card stacks,
  each question beside its answer. Our own option is on the tint, the others on the panel color. Loads after service-page.css
  (its tokens). No motion.
*/
.svc-compare__intro { max-width: 34em; margin: -16px auto 40px; color: var(--slate); text-align: center; text-wrap: balance; }
.svc-compare { display: grid; gap: 16px; }
.svc-option { min-width: 0; padding: 24px; border-radius: 20px; background-color: var(--panel); }
.svc-option.is-ours { background-color: var(--tint); box-shadow: inset 0 0 0 1.5px var(--anchor); }
.svc-option__name { color: var(--night); text-wrap: balance; }
.svc-option__note { margin-top: 6px; color: var(--slate); }
.svc-option__rows { display: grid; margin-top: 16px; }
.svc-option__row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 4px 16px; padding-block: 12px; border-top: 1px solid var(--ui-line); }
.svc-option.is-ours .svc-option__row { border-top-color: var(--tint-deep); }
.svc-option__row dt { color: var(--slate); }
.svc-option__row dd { color: var(--night); }
@media (min-width: 1024px) {
  /* The questions' rows line up across the three cards: the name, then one row a question */
  .svc-compare { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: auto repeat(var(--rows), auto); column-gap: 16px; row-gap: 0; }
  .svc-option { display: grid; grid-row: 1 / -1; grid-template-rows: subgrid; padding: 28px; }
  .svc-option__rows { grid-row: 2 / -1; grid-template-rows: subgrid; margin-top: 12px; }
  .svc-option__row { grid-template-columns: minmax(0, 1fr); align-content: start; }
}
.svc-compare__outro { max-width: 30em; margin: 40px auto 0; color: var(--night); text-align: center; text-wrap: balance; }

/* The table (data table: True, Web design): from 1024 px in place of the cards, which stay for narrower screens */
.svc-ctable { display: none; }
@media (min-width: 1024px) {
  .svc-compare--narrow { display: none; }
  .svc-ctable { display: table; width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
  .svc-ctable th, .svc-ctable td { padding: 18px 20px; border-top: 1px solid var(--ui-line); text-align: left; vertical-align: top; color: var(--night); font-weight: 400; }
  .svc-ctable thead th, .svc-ctable thead td { border-top: 0; padding-block: 24px 20px; vertical-align: top; }
  .svc-ctable tbody th { width: 22%; color: var(--slate); }
  .svc-ctable__name { display: block; font: 600 20px/1.25 var(--font-display, inherit); color: var(--night); }
  .svc-ctable__note { display: block; margin-top: 4px; color: var(--slate); }
  .svc-ctable .is-ours { background-color: var(--tint); border-top-color: var(--tint-deep); }
  .svc-ctable thead .is-ours { border-radius: 20px 20px 0 0; box-shadow: inset 1.5px 1.5px 0 var(--anchor), inset -1.5px 0 0 var(--anchor); }
  .svc-ctable tbody td.is-ours { box-shadow: inset 1.5px 0 0 var(--anchor), inset -1.5px 0 0 var(--anchor); font-weight: 600; }
  .svc-ctable tbody tr:last-child td.is-ours { border-radius: 0 0 20px 20px; box-shadow: inset 1.5px 0 0 var(--anchor), inset -1.5px -1.5px 0 var(--anchor); }
}
