.compatibility-page {
  min-height: 100vh;
}

.compatibility-shell {
  max-width: 72rem;
  margin-inline: auto;
  padding: clamp(3rem, 7vw, 5.5rem) clamp(1rem, 4vw, 2.5rem) 0;
}

.checker-intro {
  max-width: 44rem;
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}

.checker-intro h1 {
  margin: 0 0 .8rem;
  font-family: var(--tw-display);
  font-weight: 400;
  font-size: clamp(2.35rem, 6vw, 4.2rem);
  letter-spacing: -.045em;
  line-height: 1.04;
}

.checker-intro p {
  max-width: 35rem;
  margin: 0;
  color: var(--mute);
  font-size: 1.075rem;
  line-height: 1.55;
}

.checker-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .95fr);
  gap: clamp(1rem, 3vw, 2rem);
  align-items: start;
}

.checker-card {
  min-width: 0;
  padding: clamp(1rem, 3vw, 1.75rem);
  border: 1px solid var(--line);
  border-radius: var(--r-2xl);
  background: var(--surface);
}

.checker-card h2 {
  margin: 0;
  font-size: 1.22rem;
  font-weight: 600;
  line-height: 1.3;
}

.checker-card-heading,
.checker-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .6rem 1rem;
}

.checker-tools {
  justify-content: flex-start;
  margin-top: 1rem;
}

.checker-help {
  margin: .65rem 0 0;
  color: var(--mute);
  font-size: .875rem;
  line-height: 1.5;
}

.checker-tools .checker-help {
  margin: 0;
}

.checker-tile {
  min-inline-size: 0;
  background: var(--bg);
}

.checker-tile legend {
  padding: 0 .35rem;
  color: var(--accent);
  font-size: .9rem;
  font-weight: 600;
}

.checker-tile-top,
.checker-dimensions {
  display: grid;
  align-items: end;
  gap: .65rem;
}

.checker-tile-top {
  grid-template-columns: minmax(0, 1fr) 3.25rem;
}

.checker-dimensions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: .75rem;
}

.checker-tile label,
.checker-joint label {
  display: block;
  margin: 0;
  color: var(--ink);
  font-weight: 500;
}

.checker-card input,
.checker-card select {
  min-height: 44px;
  margin-top: .2rem;
  font-size: 1rem;
}

.checker-card select {
  appearance: none;
  padding-right: 2rem;
  background-image: linear-gradient(45deg, transparent 50%, var(--accent) 50%), linear-gradient(135deg, var(--accent) 50%, transparent 50%);
  background-position: right 1.1rem center, right .8rem center;
  background-size: .3rem .3rem;
  background-repeat: no-repeat;
}

.checker-shape {
  display: grid;
  width: 3.25rem;
  height: 3rem;
  place-items: center;
  border-radius: .65rem;
  background: var(--accent-soft);
}

.checker-shape span {
  width: 1.55rem;
  height: 1.55rem;
  border-radius: .12rem;
  background: var(--accent);
}

[data-tile-shape="rectangle"] .checker-shape span {
  width: 1.9rem;
  height: 1rem;
}

[data-tile-shape="triangle"] .checker-shape span {
  width: 1.85rem;
  height: 1.6rem;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

[data-tile-shape="rhombus"] .checker-shape span {
  width: 1.95rem;
  height: 1.15rem;
  clip-path: polygon(0 0, 67% 0, 100% 100%, 33% 100%);
}

.checker-remove {
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--mute);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: .17em;
}

.checker-remove:hover {
  color: var(--ink);
}

.checker-joint {
  margin: 1.2rem 0;
  padding: 1rem 0 0;
  border-top: 1px solid var(--line);
}

.checker-joint input {
  width: min(100%, 9rem);
}

.checker-card .btn {
  min-height: 44px;
  white-space: normal;
}

.checker-card .msg {
  margin: 1rem 0 0;
}

.checker-results {
  border-top: 4px solid var(--accent);
}

.checker-results h2 {
  scroll-margin-top: 6rem;
}

.checker-results p {
  margin-block: .65rem 0;
}

#checker-status {
  max-width: 30rem;
  color: var(--mute);
}

.checker-pattern-list,
.checker-groups ul,
.checker-alternatives ul {
  margin: .9rem 0 0;
  padding: 0;
  list-style: none;
}

.checker-pattern-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .55rem;
}

.checker-pattern-list li {
  padding: .7rem .8rem;
  border-radius: .6rem;
  background: var(--surface-2);
}

.checker-results h3 {
  margin: 0;
  font-size: .95rem;
  font-weight: 600;
  line-height: 1.4;
}

.checker-pattern-list p,
.checker-alternatives li p {
  margin: .3rem 0 0;
  color: var(--mute);
  font-size: .875rem;
  line-height: 1.4;
}

.checker-alternatives {
  margin-top: 1rem;
  padding: .95rem;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--bg);
}

.checker-alternatives li + li {
  margin-top: .65rem;
}

.checker-groups {
  margin: 1.2rem 0;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.checker-groups li {
  padding: .55rem 0;
  border-bottom: 1px solid var(--line);
  font-size: .9rem;
  line-height: 1.45;
}

.checker-groups span {
  display: block;
  color: var(--mute);
}

#checker-output > .btn {
  margin-top: 1rem;
}

@media (max-width: 50rem) {
  .checker-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 24rem) {
  .checker-pattern-list {
    grid-template-columns: minmax(0, 1fr);
  }
}
