.topic-view-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.topic-back-link {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.85rem;
  border: 1px solid #cfdbea;
  border-radius: 6px;
  background: #ffffff;
  color: #003f7d;
  font-family: "Source_Sans_Pro_Regular_Semi_Bold";
  font-size: 0.88rem;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 140ms ease, background-color 140ms ease, color 140ms ease;
}

.topic-back-link:hover,
.topic-back-link:focus-visible {
  border-color: #9eb8d8;
  background: #f7fbff;
  color: #00a3ad;
  outline: none;
}

.topic-view-tabs {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 0;
  margin-left: auto;
  padding: 3px;
  border: 1px solid #cfdbea;
  border-radius: 8px;
  background: #f7fbff;
}

.topic-view-tab {
  margin: 0;
  padding: 0.5rem 1rem;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #355476;
  font-family: "Source_Sans_Pro_Regular_Semi_Bold";
  font-size: 0.9rem;
  line-height: 1.3;
  cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.topic-view-tab:hover {
  color: #003f7d;
  background: #eef4fb;
}

.topic-view-tab:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 163, 173, 0.25);
}

.topic-view-tab.is-active {
  background: #ffffff;
  color: #003f7d;
  box-shadow: 0 1px 3px rgba(0, 63, 125, 0.1);
}

.topic-view-panel[hidden] {
  display: none !important;
}

.topic-panel-placeholder {
  border: 1px solid #cfdbea;
  border-radius: 10px;
  background: #ffffff;
  padding: 16px;
}

.topic-panel-placeholder h2 {
  margin: 0 0 10px;
  font-size: 1.05rem;
}

.topic-panel-placeholder p {
  margin: 0;
  color: #355476;
  font-size: 0.92rem;
}

@media (max-width: 720px) {
  .topic-view-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .topic-back-link {
    align-self: flex-start;
  }

  .topic-view-tabs {
    margin-left: 0;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 3px;
    padding: 3px;
  }

  .topic-view-tab {
    padding: 0.5rem 0.5rem;
    font-size: 0.85rem;
    text-align: center;
  }
}
