.table-lens {
  max-width: 1100px;
  margin: auto;
  padding: clamp(18px, 4vw, 48px);
  color: var(--ink);
  line-height: 1.6;
}
.table-lens * {
  box-sizing: border-box;
}
.table-lens [hidden] {
  /* biome-ignore lint/complexity/noImportantStyles: Native hidden must override component presentation. */
  display: none !important;
}
.table-lens header {
  max-width: 700px;
  margin-bottom: 28px;
}
.table-lens .tl-eyebrow {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.13em;
}
.table-lens h2 {
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1.07;
  letter-spacing: -0.045em;
  font-weight: 500;
  margin: 12px 0 20px;
}
.table-lens h3 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 500;
  margin: 0;
}
.table-lens label {
  display: block;
  margin: 14px 0 8px;
  font-size: 0.9rem;
}
.table-lens textarea,
.table-lens input[type="search"],
.table-lens select {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  min-width: 0;
}
.table-lens textarea {
  resize: vertical;
  line-height: 1.6;
  font-family: ui-monospace, monospace;
  font-size: 0.9rem;
  min-height: 170px;
}
.table-lens button {
  font: inherit;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 10px 16px;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  transition:
    transform 160ms,
    background 160ms;
}
.table-lens button:hover {
  background: rgba(var(--ink-rgb), 0.06);
}
.table-lens button:active {
  transform: translateY(1px);
}
.table-lens .tl-primary {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.table-lens .tl-primary:hover {
  background: var(--ink);
  opacity: 0.9;
}
.table-lens button:disabled {
  opacity: 0.45;
  cursor: default;
}
.table-lens :focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}
.table-lens .tl-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 18px 0;
}
.table-lens .tl-caption {
  font-size: 0.8rem;
  color: rgba(var(--ink-rgb), 0.84);
}
.table-lens .tl-options {
  margin: 24px 0;
  max-width: 430px;
}
.table-lens summary {
  cursor: pointer;
}
.table-lens .tl-check {
  display: flex;
  gap: 8px;
  align-items: center;
}
.table-lens .tl-notice {
  border-left: 2px solid var(--ink);
  padding: 8px 16px;
  margin: 16px 0;
  font-size: 0.9rem;
}
.table-lens .tl-result-heading {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 20px;
}
.table-lens .tl-result-heading button {
  flex-shrink: 0;
}
.table-lens .tl-scroll {
  overflow: auto;
  max-height: 65vh;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-top: 12px;
}
.table-lens table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  font-size: 0.87rem;
}
.table-lens th,
.table-lens td {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 12px;
  text-align: left;
  vertical-align: top;
  white-space: pre-wrap;
  min-width: 90px;
  max-width: 380px;
  overflow-wrap: anywhere;
}
.table-lens thead th {
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 1;
}
.table-lens tbody th {
  font-weight: 400;
  min-width: 42px;
  font-size: 0.75rem;
  color: rgba(var(--ink-rgb), 0.7);
}
.table-lens tbody tr:hover {
  background: rgba(var(--ink-rgb), 0.035);
}
.table-lens .tl-missing {
  font-style: italic;
  font-size: 0.75rem;
}
.table-lens .tl-pagination {
  justify-content: center;
  font-size: 0.8rem;
}
.table-lens .tl-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.table-lens #tl-results {
  animation: tl-arrive 260ms ease-out;
}
@keyframes tl-arrive {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (max-width: 520px) {
  .table-lens .tl-result-heading {
    flex-direction: column;
  }
  .table-lens button {
    padding: 10px 12px;
  }
  .table-lens th,
  .table-lens td {
    padding: 9px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .table-lens #tl-results {
    animation: none;
  }
  .table-lens button {
    transition: none;
  }
}
html[data-motion="off"] .table-lens #tl-results {
  animation: none;
}
html[data-motion="off"] .table-lens button {
  transition: none;
}
