/* Practice search prototype. Page-specific colors route through theme.css. */

.practice-main {
  min-height: calc(100vh - var(--nav-height));
  color: var(--ink);
  font-family: "Nunito", Arial, sans-serif;
  background: var(--practice-background, var(--background));
}

.practice-search-panel {
  position: sticky;
  top: 0;
  z-index: 8;
  display: grid;
  gap: 0.85rem;
  width: auto;
  margin-inline: var(--nav-inline-padding);
  padding: 0.9rem 1rem 1rem;
  background: var(--practice-search-surface, var(--surface-deep));
  box-shadow: 0 12px 32px var(--shadow);
}

.practice-toolbar,
.practice-toolbar-left,
.practice-toolbar-right,
.practice-sort-control,
.practice-filter-row,
.subject-filter-area,
.difficulty-filter-heading,
.practice-results-header,
.practice-pagination {
  display: flex;
  align-items: center;
}

.practice-toolbar {
  justify-content: space-between;
  gap: 1rem;
}

.practice-toolbar-left {
  min-width: 0;
  flex: 1 1 auto;
  gap: 0.7rem;
}

.practice-toolbar-right {
  flex: 0 0 auto;
  gap: 0.45rem;
}

.practice-search-control {
  position: relative;
  width: min(650px, 100%);
  min-width: 230px;
}

.practice-search-box {
  display: flex;
  min-height: 42px;
  padding: 0 0.85rem;
  align-items: center;
  color: var(--muted);
  background: var(--practice-input-surface, var(--surface));
  border-radius: 8px;
}

.practice-search-box:focus-within {
  color: var(--accent-bright);
  background: var(--practice-input-active, var(--surface-hover));
}

.practice-search-box svg,
.topic-filter-search svg {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.7;
}

.practice-search-box svg {
  margin-right: 0.65rem;
}

.practice-search-box input,
.topic-filter-search input {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: var(--transparent);
  font: inherit;
}

.practice-search-box input::placeholder,
.topic-filter-search input::placeholder {
  color: var(--muted);
  opacity: 1;
}

.practice-search-popup {
  position: absolute;
  top: calc(100% + 0.55rem);
  left: 0;
  z-index: 20;
  width: min(650px, calc(100vw - 2rem));
  max-height: min(70vh, 610px);
  padding: 0.85rem;
  overflow: auto;
  color: var(--ink);
  background: var(--practice-popup-surface, var(--surface));
  border-radius: 10px;
  box-shadow: 0 20px 60px var(--shadow);
  scrollbar-color: var(--scrollbar-thumb) var(--surface-deep);
  scrollbar-width: thin;
}

.practice-search-popup[hidden],
.practice-settings[hidden] {
  display: none;
}

.search-popup-intro,
.topic-picker-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.search-popup-intro {
  padding: 0.15rem 0.25rem 0.85rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.search-popup-intro strong,
.topic-picker-heading strong {
  color: var(--ink);
  font-size: 0.88rem;
}

.topic-picker-heading {
  padding-top: 0.85rem;
  border-top: 1px solid var(--subtle);
}

.topic-picker-heading > div {
  display: grid;
  gap: 0.16rem;
}

.topic-picker-heading span {
  color: var(--muted);
  font-size: 0.68rem;
}

.topic-filter-search {
  display: flex;
  width: min(230px, 48%);
  min-height: 32px;
  padding: 0 0.65rem;
  align-items: center;
  gap: 0.45rem;
  color: var(--muted);
  background: var(--surface-deep);
  border-radius: 6px;
  font-size: 0.76rem;
}

.topic-picker-actions {
  display: flex;
  gap: 0.65rem;
  margin-top: 0.7rem;
}

.topic-select-action {
  padding: 0;
  border: 0;
  color: var(--accent-soft);
  cursor: pointer;
  background: var(--transparent);
  font: inherit;
  font-size: 0.72rem;
}

.practice-pagination[hidden] {
  display: none;
}

.topic-select-action:hover,
.topic-select-action:focus-visible {
  color: var(--accent-bright);
  outline: 0;
}

.topic-picker-groups {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.7rem;
}

.topic-picker-group {
  padding: 0.65rem;
  background: var(--surface-deep);
  border-radius: 7px;
}

.topic-picker-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.topic-picker-group-header strong {
  color: var(--subject-color, var(--ink));
  font-size: 0.76rem;
}

.topic-picker-group-header button {
  padding: 0;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  background: var(--transparent);
  font: inherit;
  font-size: 0.65rem;
}

.topic-picker-group-header button:hover,
.topic-picker-group-header button:focus-visible {
  color: var(--ink);
  outline: 0;
}

.topic-picker-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.32rem;
}

.topic-picker-option {
  display: flex;
  min-width: 0;
  min-height: 31px;
  padding: 0.3rem 0.45rem;
  border: 1px solid var(--transparent);
  align-items: center;
  gap: 0.45rem;
  color: var(--muted);
  cursor: pointer;
  background: var(--surface);
  border-radius: 5px;
  font-size: 0.69rem;
}

.topic-picker-option:hover,
.topic-picker-option:focus-visible,
.topic-picker-option.is-selected {
  color: var(--ink);
  border-color: var(--subject-color, var(--subtle));
  outline: 0;
}

.topic-picker-option.is-selected {
  background: var(--surface-hover);
}

.topic-check-segment {
  width: 7px;
  height: 17px;
  flex: 0 0 7px;
  border: 1px solid var(--segment-color, var(--subtle));
  background: var(--transparent);
  border-radius: 999px;
}

.topic-picker-option.is-selected .topic-check-segment {
  background: var(--segment-color, var(--subtle));
}

.topic-picker-option span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.practice-sort-control {
  min-height: 42px;
  flex: 0 0 auto;
  padding-left: 0.7rem;
  color: var(--muted);
  background: var(--practice-input-surface, var(--surface));
  border-radius: 8px;
  font-size: 0.76rem;
}

.practice-sort-control select,
.practice-select-setting select {
  border: 0;
  outline: 0;
  color: var(--ink);
  background: var(--transparent);
  font: inherit;
}

.practice-sort-control select {
  min-height: 40px;
  padding: 0 0.4rem;
  cursor: pointer;
  font-weight: 700;
}

.practice-sort-control option,
.practice-select-setting option {
  color: var(--ink);
  background: var(--surface-deep);
}

.sort-direction-button,
.practice-icon-button {
  display: inline-grid;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  background: var(--transparent);
  place-items: center;
}

.sort-direction-button svg,
.practice-icon-button svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.65;
}

#practice-settings-toggle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
}

#practice-settings-toggle svg {
  stroke-width: 1.5;
}

.sort-direction-button:hover,
.sort-direction-button:focus-visible,
.practice-icon-button:hover,
.practice-icon-button:focus-visible,
.practice-icon-button[aria-expanded="true"] {
  color: var(--accent-bright);
  outline: 0;
  filter: brightness(1.2);
}

.sort-direction-button.is-ascending svg {
  transform: rotate(180deg);
}

.practice-settings-wrap {
  position: relative;
}

.practice-settings {
  position: absolute;
  top: calc(100% + 0.55rem);
  right: 0;
  z-index: 25;
  width: min(216px, calc(100vw - 1rem));
  max-height: min(78vh, 680px);
  padding: 0.75rem;
  overflow: auto;
  color: var(--ink);
  background: var(--surface-deep);
  border-radius: 8px;
  box-shadow: 0 20px 60px var(--shadow);
  scrollbar-color: var(--scrollbar-thumb) var(--surface-deep);
  scrollbar-width: thin;
}

.practice-settings section + section {
  margin-top: 0.8rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--subtle);
}

.practice-settings h2 {
  margin: 0 0 0.7rem;
  color: var(--accent-bright);
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.practice-setting-row,
.practice-select-setting {
  display: flex;
  min-height: 29px;
  align-items: center;
  justify-content: space-between;
  gap: 0.52rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.practice-select-setting select {
  max-width: 104px;
  font-size: 0.72rem;
  text-align: right;
  cursor: pointer;
}

.practice-switch {
  position: relative;
  width: 31px;
  height: 17px;
  flex: 0 0 31px;
}

.practice-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.practice-switch span {
  position: absolute;
  inset: 0;
  cursor: pointer;
  background: var(--surface-active);
  border-radius: 999px;
}

.practice-switch span::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  content: "";
  background: var(--muted);
  transition: transform 130ms ease;
}

.practice-switch input:checked + span {
  background: var(--accent);
}

.practice-switch input:checked + span::after {
  background: var(--text-on-accent);
  transform: translateX(14px);
}

.practice-switch input:focus-visible + span {
  outline: 1px solid var(--accent-bright);
  outline-offset: 2px;
}

.practice-filter-row {
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
}

.subject-filter-area {
  min-width: 0;
  flex: 1 1 auto;
  align-items: flex-start;
  gap: 0.7rem;
}

.filter-label {
  flex: 0 0 auto;
  padding-top: 0.25rem;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.subject-filter-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.subject-filter-button {
  padding: 0.24rem 0.5rem;
  border: 1px solid var(--subtle);
  color: var(--muted);
  cursor: pointer;
  background: var(--transparent);
  border-radius: 999px;
  font: inherit;
  font-size: 0.68rem;
}

.subject-filter-button:hover,
.subject-filter-button:focus-visible {
  color: var(--ink);
  outline: 0;
  filter: brightness(1.2);
}

.subject-filter-button.is-selected:not([data-subject="all"]) {
  border-color: var(--subject-color);
  color: var(--subject-color);
}

.subject-filter-button[data-subject="all"].is-selected {
  border-color: var(--accent);
  color: var(--accent-bright);
}

.difficulty-filter-area {
  width: min(390px, 38vw);
  flex: 0 0 auto;
}

.difficulty-filter-heading {
  justify-content: space-between;
  gap: 1rem;
}

.difficulty-filter-heading .filter-label {
  padding-top: 0;
}

.difficulty-filter-heading output {
  color: var(--muted);
  font-size: 0.68rem;
}

.difficulty-range {
  position: relative;
  touch-action: none;
  height: 24px;
  margin-top: 0.35rem;
}

.difficulty-range-track {
  position: absolute;
  top: 9px;
  right: 0;
  left: 0;
  height: 6px;
  border-radius: 999px;
  background: var(--difficulty-gradient, var(--accent));
}

.difficulty-range-track::after {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  content: "";
  background:
    linear-gradient(
      to right,
      var(--surface-deep) 0 var(--range-start, 0%),
      var(--transparent) var(--range-start, 0%) var(--range-end, 100%),
      var(--surface-deep) var(--range-end, 100%) 100%
    );
  opacity: 0.78;
}

.difficulty-range input[type="range"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 24px;
  margin: 0;
  padding: 0;
  pointer-events: none;
  appearance: none;
  background: var(--transparent);
}

.difficulty-range input[type="range"]::-webkit-slider-thumb {
  width: 14px;
  height: 14px;
  border: 2px solid var(--surface-deep);
  border-radius: 50%;
  cursor: grab;
  pointer-events: auto;
  appearance: none;
  background: var(--accent-bright);
}

.difficulty-range input[type="range"]::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 2px solid var(--surface-deep);
  border-radius: 50%;
  cursor: grab;
  pointer-events: auto;
  background: var(--accent-bright);
}

.practice-results-section {
  width: auto;
  margin: 0 var(--nav-inline-padding);
  padding: 1.1rem 0 2rem;
}

.practice-results-header {
  min-height: 46px;
  justify-content: space-between;
  gap: 1rem;
}

.practice-results-header h1 {
  margin: 0;
  color: var(--ink);
  font-size: 1.15rem;
}

.practice-results-header p {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.7rem;
}

.practice-results {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.75rem;
}

.problem-result-row {
  position: relative;
  min-width: 0;
  padding: 0.9rem 1rem;
  color: var(--muted);
  cursor: pointer;
  background: var(--practice-result-surface, var(--surface));
  border-radius: 7px;
  transition:
    filter 130ms ease,
    transform 130ms ease;
}

.problem-result-row:hover,
.problem-result-row:focus-visible {
  outline: 0;
  filter: brightness(1.07);
  transform: translateY(-1px);
}

.problem-result-heading h2 {
  min-width: 0;
  margin: 0;
  color: var(--ink);
  font-size: 1.32rem;
  line-height: 1.24;
}

.problem-result-title-line {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.problem-result-title-line .result-badges {
  flex: 0 0 auto;
  padding-top: 0.08rem;
}

.problem-result-source {
  margin: 0.18rem 0 0;
  color: var(--muted);
  font-size: 0.7rem;
  opacity: 0.72;
}

.problem-result-statement {
  display: -webkit-box;
  margin: 0.65rem 0 0;
  overflow: hidden;
  color: var(--muted);
  font-family: "Nunito", Arial, sans-serif;
  font-size: 0.92rem;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: var(--statement-lines, 4);
}

.problem-result-statement mjx-container {
  color: var(--ink);
}

.practice-results[data-preview-lines="full"] .problem-result-statement {
  display: block;
  overflow: visible;
}

.problem-result-divider {
  height: 1px;
  margin: 0.75rem 0 0.65rem;
  background: var(--subtle);
  opacity: 0.72;
}

.problem-result-meta {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: 0.55rem;
}

.result-subject {
  flex: 0 0 auto;
  padding: 0.2rem 0.48rem;
  border-radius: 999px;
  font-size: 0.7rem;
}

.result-meta-arrow {
  width: 22px;
  height: 12px;
  flex: 0 0 22px;
  margin-top: 0.22rem;
  color: var(--subtle);
}

.result-meta-arrow path {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

.variant-difficulty-list {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.3rem;
}

.variant-difficulty {
  display: inline-flex;
  width: 10px;
  height: 25px;
  min-width: 10px;
  padding: 0;
  border: 1.5px solid
    color-mix(in srgb, var(--difficulty-color) 48%, rgba(0, 0, 0, 1));
  align-items: center;
  overflow: hidden;
  color: var(--difficulty-text-color);
  cursor: pointer;
  background: var(--difficulty-color);
  border-radius: 999px;
  font: inherit;
  transition:
    width 170ms ease,
    min-width 170ms ease,
    filter 120ms ease;
}

.variant-difficulty:hover,
.variant-difficulty:focus-visible,
.variant-difficulty.is-expanded {
  width: 118px;
  min-width: 118px;
  outline: 0;
  filter: brightness(1.08);
}

.variant-difficulty.is-filtered-out {
  opacity: 0.3;
}

.variant-difficulty-label {
  display: block;
  min-width: 112px;
  padding: 0 0.48rem;
  overflow: hidden;
  font-size: 0.66rem;
  font-weight: 700;
  opacity: 0;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: opacity 100ms ease 55ms;
}

.variant-difficulty:hover .variant-difficulty-label,
.variant-difficulty:focus-visible .variant-difficulty-label,
.variant-difficulty.is-expanded .variant-difficulty-label {
  opacity: 1;
}

.problem-result-footer {
  display: flex;
  min-width: 0;
  margin-top: 0.62rem;
  align-items: center;
}

.result-topic-list,
.result-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
}

.result-topic-list {
  min-width: 0;
}

.result-topic {
  padding: 0.18rem 0.42rem;
  border: 1px solid var(--subtle);
  color: var(--muted);
  background: var(--transparent);
  border-radius: 999px;
  font-size: 0.64rem;
}

.result-topic.is-multicolor {
  border-color: var(--transparent);
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    var(--topic-gradient) border-box;
}

.result-topic.is-hidden {
  opacity: 0.5;
}

.result-badge {
  display: inline-grid;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 1px solid var(--problem-flag-yellow);
  color: var(--problem-flag-text);
  cursor: pointer;
  background: var(--problem-flag-blue);
  border-radius: 50%;
  font: inherit;
  font-size: 0.62rem;
  place-items: center;
}

.result-badge:hover,
.result-badge:focus-visible {
  outline: 0;
  filter: brightness(1.25);
}

.practice-results.is-cards {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.practice-results.is-cards .problem-result-row {
  min-height: 260px;
}

.practice-results.is-compact .problem-result-row,
.practice-results.is-density-compact .problem-result-row {
  padding: 0.62rem 0.75rem;
}

.practice-results.is-compact .problem-result-statement,
.practice-results.is-compact .problem-result-divider {
  display: none;
}

.practice-results.is-compact .problem-result-footer {
  margin-top: 0.45rem;
}

.practice-empty-state {
  display: grid;
  min-height: 220px;
  margin-top: 0.75rem;
  color: var(--muted);
  background: var(--surface);
  border-radius: 8px;
  place-content: center;
  text-align: center;
}

.practice-empty-state[hidden] {
  display: none;
}

.practice-empty-state strong {
  color: var(--ink);
}

.practice-empty-state span {
  margin-top: 0.35rem;
  font-size: 0.76rem;
}

.practice-pagination {
  min-height: 46px;
  margin-top: 0.7rem;
  justify-content: center;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.72rem;
}

.practice-pagination button {
  padding: 0;
  border: 0;
  color: var(--accent-soft);
  cursor: pointer;
  background: var(--transparent);
  font: inherit;
}

.practice-pagination button:hover,
.practice-pagination button:focus-visible {
  color: var(--accent-bright);
  outline: 0;
}

.practice-pagination button:disabled {
  color: var(--subtle);
  cursor: default;
}

.infinite-scroll-sentinel {
  min-height: 45px;
  padding-top: 0.8rem;
  color: var(--muted);
  font-size: 0.7rem;
  text-align: center;
}

.practice-dialog {
  width: min(650px, calc(100vw - 2rem));
  max-width: none;
  max-height: min(82vh, 760px);
  padding: 0;
  overflow: hidden;
  border: 0;
  color: var(--ink);
  background: var(--practice-popup-surface, var(--surface));
  border-radius: 10px;
  box-shadow: 0 24px 80px var(--shadow);
  font-family: "Nunito", Arial, sans-serif;
}

.practice-dialog::backdrop {
  background: var(--dialog-backdrop);
}

.practice-dialog-card {
  display: grid;
  max-height: min(82vh, 760px);
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.practice-dialog-header,
.practice-dialog-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface-deep);
}

.practice-dialog-header {
  min-height: 58px;
  padding: 0.65rem 0.7rem 0.65rem 1rem;
}

.practice-dialog-header > div {
  display: grid;
  gap: 0.12rem;
}

.practice-dialog-header span {
  color: var(--muted);
  font-size: 0.65rem;
}

.practice-dialog-header h2 {
  margin: 0;
  font-size: 1.03rem;
}

.practice-dialog-close {
  position: relative;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  background: var(--transparent);
}

.practice-dialog-close span::before,
.practice-dialog-close span::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 15px;
  height: 1.5px;
  border-radius: 999px;
  background: currentColor;
  content: "";
}

.practice-dialog-close span::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.practice-dialog-close span::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.practice-dialog-close:hover,
.practice-dialog-close:focus-visible {
  color: var(--accent-bright);
  outline: 0;
}

.variant-dialog-body,
.ruleset-dialog-body {
  padding: 1rem;
  overflow: auto;
  scrollbar-color: var(--scrollbar-thumb) var(--surface-deep);
  scrollbar-width: thin;
}

.variant-option {
  display: grid;
  width: 100%;
  padding: 0.8rem;
  border: 0;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.75rem;
  color: var(--muted);
  cursor: pointer;
  background: var(--surface-deep);
  border-radius: 7px;
  font: inherit;
  text-align: left;
}

.variant-option + .variant-option {
  margin-top: 0.55rem;
}

.variant-option:hover,
.variant-option:focus-visible {
  outline: 0;
  filter: brightness(1.12);
}

.variant-option-difficulty {
  min-width: 92px;
  padding: 0.28rem 0.48rem;
  align-self: start;
  color: var(--difficulty-text-color);
  background: var(--difficulty-color);
  border-radius: 999px;
  font-size: 0.67rem;
  font-weight: 700;
  text-align: center;
}

.variant-option-copy {
  display: grid;
  gap: 0.3rem;
}

.variant-option-copy strong {
  color: var(--ink);
  font-size: 0.85rem;
}

.variant-option-copy span {
  font-family: "et-book", Georgia, serif;
  font-size: 0.82rem;
  line-height: 1.35;
}

.ruleset-dialog-body > p {
  margin: 0 0 0.85rem;
  color: var(--muted);
  font-size: 0.76rem;
}

.ruleset-options {
  display: grid;
  gap: 0.55rem;
}

.ruleset-option {
  display: grid;
  padding: 0.8rem;
  border: 1px solid var(--transparent);
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.7rem;
  color: var(--muted);
  cursor: pointer;
  background: var(--surface-deep);
  border-radius: 7px;
}

.ruleset-option:has(input:checked) {
  border-color: var(--accent);
  color: var(--ink);
}

.ruleset-option input {
  margin-top: 0.18rem;
  accent-color: var(--accent);
}

.ruleset-option-copy {
  display: grid;
  gap: 0.25rem;
}

.ruleset-option-copy strong {
  color: var(--ink);
  font-size: 0.84rem;
}

.ruleset-option-copy span {
  font-size: 0.74rem;
  line-height: 1.4;
}

.practice-dialog-footer {
  min-height: 58px;
  padding: 0.65rem 1rem;
  justify-content: flex-end;
}

.ruleset-start-button {
  min-width: 125px;
  min-height: 34px;
  padding: 0 0.85rem;
  border: 0;
  color: var(--text-on-accent);
  cursor: pointer;
  background: var(--accent);
  border-radius: 6px;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 700;
}

.ruleset-start-button:hover,
.ruleset-start-button:focus-visible {
  outline: 0;
  filter: brightness(1.16);
}

.badge-dialog-description {
  margin: 0;
  padding: 1rem;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.5;
}

@media (max-width: 1180px) {
  .practice-search-panel {
    padding-inline: 1rem;
  }
}

@media (max-width: 860px) {
  .practice-toolbar,
  .practice-filter-row {
    align-items: stretch;
  }

  .practice-toolbar-left,
  .practice-filter-row {
    flex-direction: column;
  }

  .practice-search-control,
  .difficulty-filter-area {
    width: 100%;
  }

  .practice-sort-control {
    width: max-content;
  }

  .subject-filter-area {
    flex-direction: column;
  }

  .practice-results.is-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .practice-search-panel,
  .practice-results-section {
    margin-inline: var(--nav-inline-padding-mobile);
  }

  .practice-toolbar {
    flex-wrap: wrap;
  }

  .practice-toolbar-left {
    width: 100%;
    flex-basis: 100%;
  }

  .practice-toolbar-right {
    margin-left: auto;
  }

  .topic-picker-options {
    grid-template-columns: 1fr;
  }

  .search-popup-intro,
  .topic-picker-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .topic-filter-search {
    width: 100%;
  }

  .problem-result-meta {
    flex-wrap: wrap;
  }

  .problem-result-footer {
    align-items: flex-start;
  }

  .variant-option {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 380px) {
  .practice-search-panel,
  .practice-results-section {
    margin-inline: var(--nav-inline-padding-compact);
  }
}
