.test-entry { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 8px; min-width: 0; }
.test-entry .test-card { min-width: 0; }
.topic-trigger { flex: none; min-width: 44px; min-height: 44px; }
.topic-trigger .icon { color: #ebcf8f; }
.test-entry .topic-trigger { margin-top: 4px; }
.study-shell .page-heading > .topic-trigger, .screen-practice .page-heading > .topic-trigger { align-self: flex-end; }
.test-heading-controls { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; }
.path-topic-controls { position: sticky; z-index: 5; top: 8px; width: fit-content; max-width: 100%; margin: 0 0 8px auto; padding: 4px 5px 4px 10px; border: 1px solid var(--border); border-radius: 10px; background: #29271f; }
.topics-dialog { width: min(620px, calc(100% - 24px)); max-height: min(720px, calc(100% - 24px)); min-width: 0; padding: 0; margin: auto; color: var(--text); background: #27251f; box-shadow: 0 18px 50px #0009; }
.topics-dialog[open] { display: flex; flex-direction: column; }
.topics-dialog::backdrop { background: #110f0dc9; }
.topics-header, .topics-footer { display: flex; flex: none; align-items: flex-start; justify-content: space-between; gap: 8px; padding: 12px 14px; }
.topics-header { border-bottom: 1px solid var(--border); }
.topics-header p { margin-top: 3px; overflow-wrap: anywhere; }
.topics-header .icon-button { flex: none; }
.topics-footer { align-items: center; border-top: 1px solid var(--border); }
.topics-scroll { flex: 1 1 auto; overflow: auto; overscroll-behavior: contain; min-width: 0; padding: 12px 14px; }
.topics-status { flex: none; padding: 8px 14px 0; }
.topics-status:empty { display: none; }
.topics-status-line { display: flex; align-items: center; gap: 6px; }
.topics-status-line .icon { width: 18px; height: 18px; }
.topic-list { display: grid; gap: 8px; padding: 0; margin: 0; list-style: none; }
.topic-row { display: grid; gap: 6px; min-width: 0; padding: 10px 11px; }
.topic-row-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.topic-row-heading h3 { color: #f7efd9; overflow-wrap: anywhere; }
.topic-row-heading strong { flex: none; color: #e7d08c; white-space: nowrap; font-size: 1.35rem; font-variant-numeric: tabular-nums; line-height: 1.1; }
.topic-row p { color: #e2d7bd; white-space: pre-wrap; overflow-wrap: anywhere; }
.topic-row small { color: var(--muted); font-size: .82rem; }
.topic-progress { appearance: none; display: block; width: 100%; height: 7px; overflow: hidden; border: 0; border-radius: 20px; color: #cddc84; background: #423d32; }
.topic-progress::-webkit-progress-bar { background: #423d32; }
.topic-progress::-webkit-progress-value { background: #cddc84; }
.topic-progress::-moz-progress-bar { background: #cddc84; }

@media (max-width: 760px) {
  .path-topic-controls { top: 65px; }
}
@media (max-width: 600px) {
  .test-heading-controls { width: 100%; justify-content: space-between; }
  .topics-header, .topics-footer { padding: 10px; }
  .topics-scroll { padding: 10px; }
}
