.law-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  margin: 0 0 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
}

.law-tools .docs-search {
  flex: 1;
  min-width: 240px;
}

.law-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.law-filter button {
  font-family: var(--swt-head);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--text);
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  transition: background-color .15s, border-color .15s, color .15s;
}

.law-filter button:hover {
  border-color: var(--brand);
  background: var(--swt-blue-tint);
}

.law-filter button.active,
.law-filter button.active:hover {
  background: var(--swt-plate);
  border-color: var(--swt-plate);
  color: var(--swt-ink);
}

.law-meta {
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
  margin: -24px 0 40px;
}

.docs-content .law-section > h2 {
  margin-top: 56px;
}

.docs-content .law-section:first-of-type > h2 {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

.docs-content .law-section > h2 .law-section-count {
  margin-left: auto;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--muted);
  white-space: nowrap;
}

.law-charge {
  scroll-margin-top: 160px;
}

.law-charge:target {
  border-color: var(--brand);
}

.law-charge-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 8px;
}

.docs-content .law-charge-head > h3.swt-rule-title {
  margin: 0;
  padding-top: 4px;
}

.docs-content .law-charge-head > h3.swt-rule-title a {
  color: inherit;
  font-weight: inherit;
}

.law-penalty {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  flex: none;
  max-width: 60%;
}

.law-plate {
  display: inline-block;
  font-family: var(--swt-head);
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--swt-ink);
  background: var(--swt-plate);
  border-radius: 6px;
  padding: 8px;
  white-space: nowrap;
}

.law-plate-dark {
  color: var(--text);
  background: var(--surface-raised);
  border: 1px solid var(--border);
  padding: 7px 8px;
}

.law-class {
  margin: 0 0 8px;
}

.law-class .swt-chip {
  font-size: 14px;
}

.docs-content .law-charge p.law-desc {
  margin: 0;
}

@media (max-width: 900px) {
  .law-charge-head {
    flex-direction: column;
    gap: 8px;
  }

  .law-penalty {
    justify-content: flex-start;
    max-width: none;
  }

  .law-tools {
    margin-bottom: 32px;
    padding-bottom: 32px;
  }
}

.docs-content .law-charge-head > h3.swt-rule-title {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0 8px;
  font-family: var(--swt-head);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: .01em;
  text-transform: uppercase;
  color: var(--text);
}

.docs-content .law-charge-head > h3.swt-rule-title a:hover {
  color: #cfe1ff;
}
