.tk-quality { display: grid; gap: 1rem; }
.tk-quality .tk-toolbar, .tk-quality .tk-section, .tk-quality .tk-card { padding: 1rem; }
.tk-toolbar, .tk-controls, .tk-list-toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: .75rem; }
.tk-quality .tk-toolbar { justify-content: space-between; overflow: visible; }
.tk-quality label { display: grid; gap: .3rem; font-weight: 600; }
.tk-quality :is(input, select, .tk-button) {
  min-height: 2.5rem; border: 1px solid #98a6b2; border-radius: .45rem; padding: .4rem .65rem;
  font: inherit; color: inherit; background: transparent;
}
.tk-quality .tk-button { cursor: pointer; }
.tk-quality .tk-button[aria-pressed="true"] { color: #fff; background: #203b51; border-color: #203b51; }
.tk-company-control { display: grid; gap: .3rem; min-width: 0; }
.tk-company-label { font-weight: 600; }
.tk-company-filter { position: relative; min-width: 0; }
.tk-company-filter > summary {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  min-width: min(11rem, 100%); max-width: 100%; font-weight: 600; list-style: none;
}
.tk-company-filter > summary::-webkit-details-marker { display: none; }
.tk-company-chevron { flex: none; width: .45rem; height: .45rem; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.tk-company-filter[open] .tk-company-chevron { transform: rotate(225deg); }
.tk-company-options {
  position: absolute; z-index: 5; inset-inline-start: 0; top: calc(100% + .35rem);
  width: min(21rem, 85vw); border: 1px solid #98a6b2; border-radius: .55rem; overflow: hidden;
  color: var(--popover-foreground, #203b51); background: var(--popover, #fff); box-shadow: 0 5px 18px #203b5126;
}
.tk-company-options-title { padding: .65rem .85rem; font-weight: 600; border-bottom: 1px solid #98a6b255; }
.tk-company-list { max-height: min(19rem, 42vh); overflow-y: auto; padding: .25rem; }
.tk-quality .tk-company-list label {
  display: grid; grid-template-columns: 1rem minmax(0, 1fr); align-items: center; gap: .65rem;
  min-height: 2.25rem; padding: .35rem .6rem; border-radius: .3rem; font-weight: 500; cursor: pointer;
}
.tk-company-list label:hover, .tk-company-list label:focus-within { background: #98a6b222; }
.tk-company-list label span { word-break: normal; overflow-wrap: anywhere; }
.tk-company-list input[type="checkbox"] { min-height: 0; width: 1rem; height: 1rem; margin: 0; }
.tk-company-options-footer { padding: .55rem .85rem; border-top: 1px solid #98a6b255; }
.tk-company-options .tk-button:disabled { opacity: .55; cursor: default; }
@media (max-width: 640px) {
  .tk-period-controls { width: 100%; }
  .tk-company-control { width: 100%; }
  .tk-company-options { position: static; width: 100%; margin-top: .35rem; }
}
.tk-dashboard { display: grid; gap: 1rem; }
.tk-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: .75rem; }
.tk-card h2, .tk-ranking h3 { margin: 0 0 .45rem; font-size: 1rem; }
.tk-card > strong { font-size: 1.75rem; }
.tk-quality p { margin: .4rem 0; }
.tk-quality .tk-section > h2 { margin: 0; }
.tk-ranking ol { margin: 0; padding: 0; list-style: none; }
.tk-ranking li { display: flex; justify-content: space-between; gap: .5rem; padding: .45rem 0; border-bottom: 1px solid #98a6b255; }
.tk-ranking strong { white-space: nowrap; }
.tk-section .tk-cards { margin-top: .85rem; }
.tk-filters fieldset { display: grid; gap: .5rem; margin: 0; min-width: 0; border: 1px solid #98a6b2; border-radius: .45rem; padding: .65rem; }
.tk-filters legend { padding-inline: .25rem; font-weight: 600; }
.tk-range { display: grid; grid-template-columns: 1fr 1fr; gap: .45rem; }
.tk-range input { width: 100%; min-width: 0; }
.tk-table-scroll { overflow: auto; }
.tk-table { width: 100%; border-collapse: collapse; white-space: nowrap; }
.tk-table :is(td, th) { padding: .65rem; border-bottom: 1px solid #98a6b255; text-align: left; }
.tk-table th button { padding: 0; background: none; border: 0; color: inherit; font: inherit; cursor: pointer; }
.tk-table caption { caption-side: bottom; padding: .8rem; }
.tk-note { font-size: .875rem; }
