.penalty-page {
  background: var(--paper);
}

.penalty-workspace {
  grid-template-columns: minmax(320px, 2fr) minmax(0, 3fr);
}

.penalty-directory {
  min-width: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.penalty-directory > header {
  padding: 18px 18px 12px;
  border-bottom: 1px solid var(--line);
}

.penalty-directory > header p,
.content-heading p {
  margin: 0 0 3px;
  color: var(--regulatory);
  font-size: 10px;
  font-weight: 750;
}

.penalty-directory h2,
.content-heading h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 28px;
  line-height: 1.2;
}

#authorityNav {
  min-height: 0;
  overflow-y: auto;
  padding: 4px 0 14px;
}

#authorityNav button {
  position: relative;
  width: 100%;
  min-height: 35px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 16px 7px 20px;
  border: 0;
  border-left: 3px solid transparent;
  background: transparent;
  color: #4c4944;
  cursor: pointer;
  font-size: 12px;
  text-align: left;
}

#authorityNav button:hover,
#authorityNav button:focus-visible,
#authorityNav button.active {
  border-left-color: var(--regulatory);
  background: var(--regulatory-soft);
  color: var(--regulatory);
  outline: none;
}

#authorityNav button.active {
  font-weight: 750;
}

#authorityNav strong,
.directory-group > summary strong,
.directory-subgroup > summary strong {
  color: #8d8880;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.directory-all {
  min-height: 42px !important;
  font-weight: 700;
}

.directory-group {
  border-top: 1px solid var(--line);
}

.directory-group > summary,
.directory-subgroup > summary {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 18px;
  color: #393631;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  list-style: none;
}

.directory-group > summary::-webkit-details-marker,
.directory-subgroup > summary::-webkit-details-marker {
  display: none;
}

.directory-group > summary::before,
.directory-subgroup > summary::before {
  content: "+";
  width: 14px;
  color: #8a837b;
  font-size: 14px;
}

.directory-group[open] > summary::before,
.directory-subgroup[open] > summary::before {
  content: "−";
}

.directory-group > summary span,
.directory-subgroup > summary span {
  flex: 1;
}

.directory-subgroup {
  margin-left: 14px;
  border-left: 1px solid var(--line);
}

.directory-subgroup > summary {
  min-height: 36px;
  padding-left: 14px;
  font-size: 11px;
  font-weight: 600;
}

.directory-subgroup button {
  min-height: 34px !important;
  padding-left: 30px !important;
  font-size: 11px !important;
}

.directory-empty {
  padding: 10px 18px;
  color: var(--muted);
  font-size: 11px;
}

.source-note {
  padding: 16px 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.source-note strong {
  color: var(--regulatory);
}

.source-note p {
  margin: 4px 0;
}

.source-note span {
  color: #99938c;
}

.content-heading > div > span {
  display: block;
  margin-top: 4px;
  color: #858078;
  font-size: 10px;
}

.content-heading > a {
  height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  color: #5d5953;
  font-size: 11px;
}

.content-heading > a:hover,
.content-heading > a:focus-visible {
  border-color: var(--regulatory);
  color: var(--regulatory);
  outline: none;
}

.penalty-stats > div {
  min-width: 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 14px;
  border-right: 1px solid var(--line);
}

.penalty-stats > div:last-child {
  border-right: 0;
}

.penalty-stats span {
  color: #817c74;
  font-size: 9px;
}

.penalty-stats strong {
  color: #292621;
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
}

.penalty-filters select {
  font-size: 11px;
}

.penalty-list {
  display: grid;
  gap: 0;
}

.penalty-card {
  width: 100%;
  display: block;
  padding: 15px 18px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.penalty-card:hover,
.penalty-card:focus-visible {
  background: #fcf8f6;
  box-shadow: inset 3px 0 var(--regulatory);
  outline: none;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 10px;
}

.card-meta em {
  padding: 2px 6px;
  border-radius: 10px;
  background: var(--regulatory-soft);
  color: var(--regulatory);
  font-style: normal;
}

.penalty-card h3 {
  margin: 8px 0 5px;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.45;
}

.penalty-card p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: #5f5a53;
  font-size: 11px;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.penalty-card footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 10px;
}

.penalty-card footer strong {
  color: var(--regulatory);
}

.penalty-card small {
  display: inline-block;
  margin-top: 7px;
  color: #8c642e;
  font-size: 10px;
}

.empty {
  padding: 50px 20px;
  color: var(--muted);
  text-align: center;
}

.penalty-dialog {
  width: min(900px, calc(100% - 32px));
  max-height: calc(100vh - 40px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: var(--shadow);
}

.penalty-dialog::backdrop {
  background: rgba(20, 18, 16, 0.56);
}

.penalty-dialog article > header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 28px;
  background: var(--regulatory);
  color: #fff;
}

.penalty-dialog header p,
.penalty-dialog header h2 {
  margin: 0;
}

.penalty-dialog header h2 {
  margin: 6px 0;
  font-family: var(--serif);
  font-size: 26px;
}

.penalty-dialog header span {
  font-size: 11px;
  opacity: 0.84;
}

.penalty-dialog [data-close] {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 3px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font-size: 22px;
}

.penalty-dialog dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  padding: 18px 28px;
  border-bottom: 1px solid var(--line);
}

.penalty-dialog dl div {
  padding: 7px 0;
}

.penalty-dialog dt {
  color: var(--muted);
  font-size: 10px;
}

.penalty-dialog dd {
  margin: 4px 0 0;
  font-size: 12px;
}

.penalty-dialog section {
  padding: 17px 28px;
  border-bottom: 1px solid var(--line);
}

.penalty-dialog section h3 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: 18px;
}

.penalty-dialog section p,
.penalty-dialog li {
  color: #504b45;
  font-size: 12px;
  line-height: 1.8;
}

.detail-alert {
  background: #fff8ec;
}

.penalty-dialog article > footer {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  padding: 18px 28px;
}

.penalty-dialog footer a,
.penalty-dialog footer button {
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid #caa7aa;
  border-radius: 3px;
  background: #fff;
  color: var(--regulatory);
  cursor: pointer;
  font-size: 11px;
}

@media (max-width: 760px) {
  .penalty-page .regulatory-library-nav .regulatory-library-link {
    flex: 0 0 auto;
    min-width: 116px;
    min-height: 48px;
    padding: 0 12px;
    scroll-snap-align: start;
  }

  .penalty-workspace {
    display: block;
    padding: 10px;
  }

  .penalty-directory {
    display: block;
    border: 0;
    background: transparent;
  }

  .penalty-directory > header,
  .source-note {
    display: none;
  }

  #authorityNav {
    max-height: 320px;
    margin-bottom: 10px;
    padding: 0;
    border: 1px solid var(--line);
    background: #fff;
  }

  .directory-all {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #fff !important;
  }

  .penalty-content {
    border: 0;
  }

  .content-heading > a {
    display: none;
  }

  .penalty-page .penalty-stats {
    display: none;
  }

  .penalty-page .mobile-filter-toggle {
    width: calc(100% - 24px);
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 12px 8px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 3px;
    background: #fff;
    color: #3f3b35;
  }

  .penalty-page .mobile-filter-toggle strong {
    color: var(--regulatory);
    font-size: 11px;
  }

  .penalty-page .penalty-filters {
    display: none;
  }

  .penalty-page .penalty-filters.open {
    display: flex;
    gap: 8px;
    padding: 4px 12px 12px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .penalty-page .penalty-filters.open label {
    flex: 0 0 158px;
  }

  .penalty-card {
    padding: 13px 12px;
  }

  .penalty-card h3 {
    font-size: 15px;
  }

  .penalty-card footer {
    display: grid;
    gap: 4px;
  }

  .penalty-dialog {
    width: 100%;
    max-height: 100vh;
    height: 100vh;
    border: 0;
    border-radius: 0;
  }

  .penalty-dialog dl {
    grid-template-columns: 1fr;
  }
}
