/* Responsive rules */
@media (max-width: 900px) {
  :root {
    --header-offset: 116px;
  }

  .site-header {
    top: 6px;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .brand {
    width: 100%;
  }

  .header-controls {
    justify-content: flex-start;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 2px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .header-controls::-webkit-scrollbar {
    display: none;
  }

  .section-nav,
  .header-actions {
    flex: 0 0 auto;
  }
}

@media (max-width: 780px) {
  :root {
    --header-offset: 122px;
  }

  .app-shell {
    width: min(100% - 18px, var(--page-width));
    padding-top: 8px;
  }

  .site-header {
    margin-bottom: 22px;
    border-radius: 20px;
    padding: 10px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    border-radius: 11px;
  }

  .brand-title {
    font-size: 1rem;
  }

  .brand-subtitle {
    font-size: 0.64rem;
  }

  button,
  .section-nav a {
    min-height: 33px;
    padding: 6px 10px;
    font-size: 0.8rem;
  }

  .switch-control button {
    min-height: 28px;
    padding: 5px 8px;
  }

  .section-heading,
  .practice-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .practice-actions {
    justify-content: flex-start;
    width: 100%;
  }

  .practice-actions button {
    flex: 1 1 auto;
    min-height: 36px;
    padding: 7px 10px;
    font-size: 0.82rem;
  }

  .question,
  .empty-state {
    border-radius: 14px;
    padding: 14px;
  }

  .question-text {
    font-size: 1rem;
  }

  .options li {
    padding: 9px;
  }
}

@media (max-width: 420px) {
  :root {
    --header-offset: 118px;
  }

  .section-nav a,
  .header-actions button {
    padding-inline: 9px;
    font-size: 0.76rem;
  }

  .brand-title {
    font-size: 0.94rem;
  }

  .practice-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}


@media (orientation: landscape) and (max-height: 520px) {
  .question-text,
  .options label {
    font-size: 0.98rem;
  }
}
