.types-groups {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
  margin-top: 13px;
}

.appeal-types-toolbar h2 { margin-top: 0; }

.types-category-menu,
.types-topic-panel {
  min-width: 0;
  border: 1px solid #dfe4e8;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(24, 39, 54, .04);
}

.types-category-menu {
  align-self: start;
  padding: 18px 10px;
}

.types-category-list {
  display: grid;
  gap: 3px;
}

.types-category-item {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 46px;
  padding: 7px 10px;
  border-radius: 6px;
  color: #31485c;
  text-align: left;
  font-size: 14px;
  font-weight: 600;
  transition: color .16s ease, background .16s ease;
}

.types-category-icon {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  color: #57697d;
  background: #eef3f7;
  font-size: 11px;
}

.types-category-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.types-category-item strong {
  color: #41505f;
  font: 700 12px "DM Sans", sans-serif;
}

.types-category-item:hover {
  color: #162c40;
  background: #f6f8fa;
}

.types-category-item.active {
  color: #a55000;
  background: #fff0dc;
}

.types-category-item.active .types-category-icon {
  color: #a05300;
  background: #fff;
}

.types-category-item.active strong { color: #9a5712; }

.types-category-item:focus-visible,
.type-topic-row:focus-visible {
  outline: 2px solid #f79009;
  outline-offset: 2px;
}

.types-topic-panel { padding: 25px 26px 8px; }

.types-topic-panel--entering {
  animation: types-topic-panel-enter .28s ease both;
  will-change: opacity, transform;
}

@keyframes types-topic-panel-enter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .types-topic-panel--entering { animation: none; }
}

.types-topic-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e7eaed;
}

.types-topic-head span {
  color: #41505f;
  font-size: 10px;
}

.types-topic-head h2 {
  margin: 7px 0 0;
  color: #172b3d;
  font-size: 22px;
  letter-spacing: 0;
}

.types-topic-head .types-topic-total {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 7px;
  color: #9a5712;
  background: #fff2df;
  font: 700 11px "DM Sans", sans-serif;
}

.types-topic-list { display: flex; flex-direction: column; }

.type-topic-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 0;
  min-height: 104px;
  padding: 18px 12px;
  border-bottom: 1px solid #e9ecef;
  border-radius: 8px;
  color: #172b3d;
  text-decoration: none;
  transition: box-shadow .16s ease;
}

.type-topic-row:last-child { border-bottom: 0; }

.type-topic-row:hover {
  box-shadow: inset 0 0 0 1px #f79009;
}

.type-topic-index {
  align-self: start;
  padding-top: 2px;
  color: #955919;
  font: 700 13px "DM Sans", sans-serif;
}

.type-topic-content {
  display: block;
  min-width: 0;
}

.type-topic-content strong {
  display: block;
  color: #172b3d;
  font-size: 15px;
  line-height: 1.4;
}

.type-topic-description {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 6px;
  color: #294258;
  font-size: 11.5px;
  line-height: 1.75;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

/* Let the type list description use the full content column. The shared
   refinement stylesheet caps this element for other layouts. */
body[data-page="appeal-types"] .type-topic-description {
  width: 100%;
  max-width: none;
}

.type-topic-content small {
  display: block;
  margin-top: 7px;
  color: #41505f;
  font-size: 9px;
}

.type-topic-row > i {
  color: #885f2f;
  font-size: 10px;
}

@media (max-width: 980px) {
  .types-groups { grid-template-columns: 214px minmax(0, 1fr); }
  .types-category-item {
    grid-template-columns: 24px minmax(0, 1fr) auto;
    min-height: 44px;
    font-size: 13px;
  }
  .types-category-icon { width: 24px; height: 24px; font-size: 10px; }
  .types-category-item strong { font-size: 11px; }
}

@media (max-width: 760px) {
  .types-groups { display: block; }
  .types-category-menu { padding: 12px; }
  .types-category-list {
    display: flex;
    gap: 7px;
    overflow-x: auto;
    padding-bottom: 3px;
    scrollbar-width: thin;
  }
  .types-category-item {
    grid-template-columns: auto auto;
    flex: 0 0 auto;
    width: auto;
    min-height: 36px;
    padding: 6px 10px;
    white-space: nowrap;
  }
  .types-category-icon { display: none; }
  .types-category-item strong { margin-left: 4px; }
  .types-topic-panel { margin-top: 10px; padding: 18px 15px 5px; }
  .types-topic-head { padding-bottom: 16px; }
  .types-topic-head h2 { font-size: 19px; }
  .type-topic-row {
    grid-template-columns: 29px minmax(0, 1fr) 14px;
    min-height: 112px;
    padding: 16px 12px;
  }
  .type-topic-description { -webkit-line-clamp: 3; }
}
