/* Ways to do the job, compared (kit/Options.astro). */

.kopts__scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  background: var(--paper);
  scrollbar-width: thin;
}
.kopts__scroll:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.kopts__table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: var(--fs-small);
}
.kopts__table th,
.kopts__table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.kopts__corner {
  width: 26%;
  vertical-align: bottom !important;
}
.kopts__corner .mono-label {
  color: var(--faint);
}
.kopts__opt {
  width: 18.5%;
}
.kopts__optname {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 550;
  color: var(--ink);
  line-height: 1.3;
}
.kopts__best {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: var(--fs-xs);
  font-weight: 400;
  line-height: 1.45;
}
.kopts__opt--ours {
  background: var(--accent-tint);
  box-shadow: inset 0 3px 0 var(--accent);
}
.kopts__cell--ours {
  background: color-mix(in srgb, var(--accent-tint) 55%, transparent);
}
/* the question column stays in place when the table scrolls sideways */
.kopts__table th:first-child,
.kopts__table td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--paper);
}
.kopts__why td:first-child {
  position: static;
}
.kopts__qbtn {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-weight: 500;
  text-align: left;
  line-height: 1.4;
  cursor: pointer;
}
.kopts__qbtn:hover {
  color: var(--accent-ink);
}
.kopts__qbtn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
.kopts__chev {
  flex: none;
  margin-top: 3px;
  color: var(--accent-deep);
  transition: transform 240ms var(--ease);
}
.kopts__qbtn[aria-expanded='true'] .kopts__chev {
  transform: rotate(180deg);
}
.kopts__group.is-open .kopts__row > * {
  border-bottom-color: transparent;
}
.kopts__group.is-open .kopts__row {
  background: var(--paper-2);
}
.kopts__group.is-open .kopts__row th:first-child {
  background: var(--paper-2);
}
.kopts__cell {
  color: var(--ink-2);
  line-height: 1.45;
}
.kopts__cell > span:last-child {
  display: block;
}
.kopts__mark {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin-bottom: 4px;
  border-radius: 50%;
}
.kopts__cell--yes .kopts__mark {
  background: var(--ok-tint);
  color: var(--ok-ink);
}
.kopts__cell--some .kopts__mark {
  background: var(--warn-tint);
  color: var(--warn-ink);
}
.kopts__cell--no .kopts__mark {
  background: var(--danger-tint);
  color: var(--danger);
}
.kopts__cell--na .kopts__mark {
  background: var(--paper-3);
  color: var(--muted);
}
.kopts.is-js .kopts__why {
  display: none;
}
.kopts.is-js .kopts__group.is-open .kopts__why {
  display: table-row;
}
.kopts__why td {
  background: var(--paper-2);
}
.kopts__whytext {
  max-width: 60rem;
  padding: 0 0 6px;
  color: var(--ink-2);
  line-height: 1.6;
  animation: kopts-in 320ms var(--ease);
}
.kopts__whytext strong {
  color: var(--ink);
  font-weight: 550;
}
@keyframes kopts-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
}
/* on a phone each question is a card and each way is a labelled line in it (RhinoMove, the last, is not off-screen) */
@media (max-width: 560px) {
  .kopts__scroll {
    overflow: visible;
    border: 0;
    background: none;
  }
  .kopts__table,
  .kopts__table tbody,
  .kopts__table tr,
  .kopts__table th,
  .kopts__table td {
    display: block;
    min-width: 0;
    width: auto;
  }
  .kopts__table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .kopts__group {
    margin-bottom: var(--s-3);
    border: 1px solid var(--line);
    background: var(--paper);
  }
  .kopts__table th,
  .kopts__table td {
    position: static !important;
    border-bottom: 0;
    padding: 10px 14px;
  }
  .kopts__table .kopts__cell::before {
    content: attr(data-opt);
    display: block;
    margin-bottom: 2px;
    font-family: var(--font-mono);
    font-size: var(--fs-mono-sm);
    letter-spacing: var(--tracking-mono);
    text-transform: uppercase;
    color: var(--muted);
  }
  .kopts__cell--ours {
    background: var(--accent-tint);
  }
  .kopts__whytext {
    max-width: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .kopts * {
    animation: none !important;
    transition: none !important;
  }
}
